Advertisement

SVG tools

Work with SVG code in your browser: minify it, pretty-print it, resize it, or recolor fills, with a live preview.

Your SVG

Paste SVG code below.

Result

Live preview

Preview appears here.
Advertisement

Four SVG operations

Minify strips comments and collapses whitespace between tags so the file is as small as possible for production. Pretty print does the opposite: it re-indents the markup so you can actually read and edit it.

Resize sets explicit width and height attributes on the root svg element, and Recolor swaps one fill or stroke color for another across the whole file, which is perfect for re-theming icon sets.

Live preview as you work

Every operation updates a live preview next to the code, so you can see the visual result immediately. The preview renders your SVG exactly as a browser would, including the new size and colors.

Copy the result to your clipboard or download it as a standalone .svg file when you are done.

SVG Tools FAQs

Will minifying break my SVG?
No. Minification only removes comments and redundant whitespace between tags. Attributes, paths, and structure are untouched, so the image renders identically.
How does the recolor tool match colors?
It finds the color you pick, in hex form, anywhere in the code and replaces it. Colors written as rgb() or named colors are not matched, so convert those to hex first.
Does resizing keep the aspect ratio?
Setting only width or only height leaves the other dimension to the viewBox, which preserves proportions. Setting both forces the exact size you enter.
Why does pretty print show a parse error?
The input is not well-formed XML. Common causes are unclosed tags, unescaped ampersands, or pasting HTML instead of SVG. Fix the markup and try again.
Is my SVG uploaded to a server?
No. All four operations run locally in your browser, so proprietary icons and graphics stay private.
Advertisement