Geometry stays untouched
The tool changes matching fill and stroke values. Paths, groups, viewBox, transforms, and element order remain as supplied.
Free SVG utility
Paste an SVG and instantly replace any color in it.
SVG · 339 B
Why this tool exists
Recoloring an icon should not require opening a full design file. This tool reads the colors already used in your SVG, lets you replace them precisely, and keeps the original geometry intact.
How to use it
Drop a file, paste SVG markup, or start with the example already in the editor.
Choose a detected source color and set its replacement. Add more mappings when the artwork has a larger palette.
Check the live preview, then copy clean SVG markup or download a new file.
The tool changes matching fill and stroke values. Paths, groups, viewBox, transforms, and element order remain as supplied.
Replacement is case-insensitive for hex values and only targets the source colors you select.
Swap exported design colors for currentColor or a shared token before adding the asset to a React or CSS workflow.
Color replacement runs locally in your browser. The SVG is not uploaded to GenSVG.
Keep working
Optimize and clean SVG files online for free. Remove comments, XML declarations, and extra whitespace to shrink markup without changing the design.
Convert SVG code to JSX for React online for free. Turn any SVG into a React component with camelCase attributes, ready to paste.
Convert SVG to a data URI or base64 string online for free. Embed SVGs directly in CSS, img tags, and HTML without a separate file.
Good to know
Paste your SVG into the tool, pick the color you want to replace and the new color, then copy the updated SVG code or download the file.
Yes. You can add multiple replace pairs — each pair swaps one source color for a new color across the whole SVG.
No. This tool runs in your browser, so your SVG stays in the current tab and is not uploaded to GenSVG.
The tool does not add a watermark or a new license. Your right to use the result depends on the license and ownership of the source artwork you provide.