Every color, even in CSS

Change SVG Color

Pick a new color for any color in your SVG, and it changes everywhere it's used, including colors set in CSS.

Last updated: November 2026

All colors

Listed for you

CSS too

style blocks

Undo

Every change

Private

No uploads

Drop SVG files here

Or paste SVG code anywhere on this page

Your files never leave this device

How to change svg color

01

Open your SVG

Drop the SVG above, choose it, or paste its code anywhere on the page. Its colors are listed first.

02

Pick new colors

Click a swatch to pick a new color, or type a hex code and press Enter. The preview changes as you pick.

03

Check and undo

Undo steps back through every change; dragging the color picker counts as one step.

04

Save it

Download the SVG, save it as PNG or JPG, or copy it for your code.

Why some SVG colors won't change

A color in an SVG can be set in three places: a fill or stroke attribute on a shape, a style attribute, or a <style> block with CSS rules. When CSS sets a fill, it wins over the fill attribute (MDN). That's why changing the attribute in a text editor, or in tools that only look at attributes, sometimes does nothing.

This tool reads all three places and counts "red", "#f00" and "rgb(255, 0, 0)" as one color, so one pick changes every shape that uses it. A color with transparency keeps it: an 80% red becomes an 80% blue.

Black shapes and currentColor

Shapes with no fill at all are drawn black (MDN). They have no color to change, so the list shows them as "No fill set (black)"; a new color for that entry becomes the SVG's default fill and colors all of them at once.

Icons often use currentColor, which takes the text color of the element around it (MDN). Swap it for a fixed color when the icon must look the same everywhere. It works the other way too: type currentColor in place of a color, and that part follows the text color of the page it's placed in.

Change SVG color with CSS, on hover or in your code

An SVG shown with an <img> tag or as a CSS background is a separate image, so your page's CSS can't reach inside to recolor it. To change its color with CSS, for example on hover, put the SVG inline in your HTML and set its colors to currentColor, then change the color property of the element around it.

Here, choose currentColor for the SVG's colors, then copy it as SVG code, JSX or a React component. For an icon that must stay an image, a CSS mask colors it with background-color instead: SVG to Data URI makes the mask CSS.

More SVG tools

Every SVG tool here runs in your browser: nothing is uploaded, and scripts inside an SVG never run (it's shown as an image, and they're removed before you save).

Frequently asked questions

How do I change the color of an SVG?

Open it above. Its colors are listed in the Edit tab; pick a new color for one, or type a hex code, and it changes everywhere in the SVG. Download it when you're done.

Why doesn't changing the fill attribute change my SVG's color?

Because the color is also set in CSS, in a style attribute or a <style> block, and CSS wins over the attribute. This tool changes the color in all those places at once.

How do I change a black SVG to another color?

If the black is a set color, pick a new one for #000000. If the shapes have no fill at all, they're drawn black by default: pick a color for "No fill set (black)" to color them all.

Can I make an SVG icon white?

Yes: pick white (#ffffff) for its color. Switch the preview background to black or the checkerboard to see it.

How do I make an SVG follow the text color?

Type currentColor as the new color. Placed inline in a page, that part then takes the text color of the element around it.

Can I change the colors of a gradient?

Yes. Each stop color of a gradient is listed with the other colors and can be changed the same way.

Can I change several SVGs at once?

You can open several SVGs together and switch between them; each one's colors are changed separately.

Are my files uploaded?

No. Everything runs in your browser and your SVGs never leave your device.

Change SVG colors

Drop an SVG above, or paste SVG code anywhere on the page.