SVGFlow
Open editor

SVG Color Editor

Change SVG colours online. Every colour in the file as a swatch — swap one, swap them all, or convert the whole icon to currentColor so it inherits from CSS.

Runs entirely in your browser — nothing is uploaded, no account needed.

Previewno file
Drop an SVG to recolour
Or paste markup below · max 2 MB
Current markup
Open an SVG to see its markup.
Colors in file
No literal colours found. The file may paint entirely through CSS or gradients.
Replace every colour

How to change SVG colours in the browser

Drop an SVG file — or paste the markup — and every distinct colour in it becomes a swatch, sorted by how often it occurs, with the count split into fills and strokes. The scan covers the three places a colour can live: presentation attributes (fill, stroke, stop-color), inline style attributes, and <style> blocks. The counts include all three, so the number next to a swatch is the number of occurrences a swap will actually rewrite, not an estimate. Everything runs in your browser — the file is never uploaded.

Replacing a swatch rewrites that exact value everywhere it appears, whichever of the three forms it takes; beyond the listed properties, the replacement also covers flood-color and lighting-color, so a matching colour inside a filter primitive follows along. Matching is case-insensitive but notation-exact: #FFF and #ffffff are listed separately because they are different strings in the file, even though they paint the same colour. Each swap is a single history step — Undo walks back one change at a time — and the updated markup sits beside the controls, ready to copy or download.

Where colour hides in an SVG

The three homes matter because different editors use different ones. Hand-written icons usually carry fill attributes; Illustrator and Inkscape exports often route everything through a <style> block of classes tucked into <defs>; inline style attributes turn up on anything that has been through a DOM. A text-editor find-and-replace only works when you already know which form the file uses and which spelling — the same red can be written #f00, #ff0000 or rgb(255,0,0), and each is a separate string. The swatch list is built from what is actually in the file, which sidesteps the guessing. Gradients paint through the stop-color of their stops, and those stops are listed and counted here as fills. Deliberately not listed: none, currentColor, url() references to gradients, and named colours like black — only hex, rgb() and hsl() literals become swatches.

One swatch, every swatch, or currentColor

There are three ways to recolour. Per swatch: pick a replacement next to any listed colour and swap that value alone — the way to work through a rebrand, palette entry by palette entry. All at once: choose one target and Apply to all flattens every listed colour to it, which is how a multicolour drawing becomes a single-tone stamp or silhouette. And Convert all to currentColor replaces every listed value with the inherited keyword in one click — the step that turns a fixed-colour icon into one that follows your CSS. The toast after each operation reports how many occurrences changed, a quick check that the file matched what the list promised.

currentColor: one icon, any theme

currentColor is the value of the CSS color property, inherited from wherever the SVG sits. An icon whose fills are currentColor follows its surroundings with no extra rules: it matches the button text next to it, changes on hover and focus because the text does, and survives a dark-mode switch untouched. That is why the conversion is the standard last step before an icon becomes a component or joins a sprite. It is also total by design — every listed colour becomes the one inherited value, so a two-tone icon comes out one-tone. For icons that need an accent, keep the second tone on a CSS custom property instead; the guide to changing SVG colours with CSS covers that pattern and the places where inheritance breaks.

When to use it

Rebranding an icon or illustration without opening a vector editor — work down the swatch list swapping each entry in turn. Normalising a file where the same grey somehow appears in five spellings — replace each variant with one canonical value and watch the list collapse as you go. Preparing an icon for componentisation, where currentColor does the theming. And baking literal colours in before rasterising: the SVG to PNG converter's rasteriser has no page for currentColor to inherit from, so an inherited-colour icon exports black — swap in a real colour here first, export, then convert back.

Common problems

  • "Nothing matched." The colour is written in a different notation than you typed — rgb(), short hex, a named colour. Pick from the swatch list rather than typing a value from memory; the list is what is actually in the file.
  • Two swatches look identical. They are the same colour in two notations, or an upper- and lowercase pair. Swap both to the same target and they collapse into one.
  • A colour you can see is missing from the list. It is a named colour like black or red — the scanner lists only hex, rgb() and hsl() literals plus gradient stops. Rewrite named colours in the editor's markup panel; gradient stops are already listed individually.
  • The icon still doesn't change on your page. If the file already paints with currentColor, its rendered colour comes from your page's CSS, not from the file — the file was never the problem.
  • currentColor flattened a two-tone icon. Converting everything to one inherited colour is exactly what the button does. Undo, then keep the accent on a CSS custom property — the pattern is in the guide.
  • You need the same icon in several colours as a background image. CSS backgrounds cannot inherit, so bake one copy per colour here before encoding each with the data URI tool — or use its mask technique and skip the copies.

Questions

Is this SVG colour editor free?

Yes. Recolouring is free, with no account, no watermark and no limit on files or changes. The site is funded by advertising.

How do I change the colour of an SVG file online?

Drop the file or paste its markup. Every colour in it appears as a swatch with a count — pick a replacement next to a swatch and press Swap, or set one colour and apply it to everything. Copy or download the result.

Where does the tool find the colours?

In all three places a colour can live in an SVG: presentation attributes like fill, stroke and stop-color, inline style attributes, and <style> blocks. Replacements rewrite whichever form each occurrence uses.

Why are #FFF and #ffffff listed as two swatches?

Because they are two different strings in the file, even though they paint the same white. Matching is exact by notation (though case-insensitive), so each spelling is its own swatch. Swap both to one value to unify them.

Can it change gradient colours?

Yes. Gradients paint through the stop-color of their stops, and those stops are collected, counted and rewritten like any other colour — each stop value gets its own swatch.

What does "Convert all to currentColor" do?

It replaces every listed colour with the currentColor keyword, so the icon inherits the CSS color of whatever contains it — text colour, hover, focus and dark mode included. It is the usual last step before an icon becomes a component.

Why is a colour I can see not in the list?

It is probably a named colour such as black or red — the list holds hex, rgb() and hsl() literals plus gradient stops. Named colours can be rewritten by hand in the editor’s markup panel.

Is my SVG uploaded to a server?

No. The file is scanned and rewritten by your own browser, on your own machine. There is no upload endpoint.

Can I undo a replacement?

Yes. Every swap, apply-to-all and currentColor conversion is one history step, and the Undo button walks them back one at a time.

I recoloured the file — why does the icon on my page still not change?

If the file paints with currentColor, its rendered colour comes from your page’s CSS, not from the file. Change the color property on the element that contains the icon, or bake a literal colour into the file here.

Can I recolour a PNG or JPG here?

No — this tool edits vector markup. Trace the image into paths first with the PNG to SVG converter, then recolour the result layer by layer.

Notes

  • Replacement covers presentation attributes, inline styles and <style> blocks — the three places a colour can hide.
  • Converting to currentColor is the fix for icons that need to follow hover, focus and dark mode without a second rule.
  • Matching is exact and case-insensitive: #FFF and #ffffff are different values to this tool, because they are different strings in the file.

Related tools