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.
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
Drop the SVG above, choose it, or paste its code anywhere on the page. Its colors are listed first.
Click a swatch to pick a new color, or type a hex code and press Enter. The preview changes as you pick.
Undo steps back through every change; dragging the color picker counts as one step.
Download the SVG, save it as PNG or JPG, or copy it for your code.
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.
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.
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.
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).
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.
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.
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.
Yes: pick white (#ffffff) for its color. Switch the preview background to black or the checkerboard to see it.
Type currentColor as the new color. Placed inline in a page, that part then takes the text color of the element around it.
Yes. Each stop color of a gradient is listed with the other colors and can be changed the same way.
You can open several SVGs together and switch between them; each one's colors are changed separately.
No. Everything runs in your browser and your SVGs never leave your device.
Drop an SVG above, or paste SVG code anywhere on the page.