svg formatter

Format SVG code online

Make minified SVG readable before code review, security checks, or component work.

svg formatter tool

Format SVG

Paste SVG and make the XML readable without changing the rendered output.

Ready

Download output

Expand compact markup

Format SVG/XML so elements, attributes, and paths are easier to inspect.

Preview after formatting

Check that formatting did not change the rendered SVG.

Copy reviewed code

Copy or download the formatted SVG for docs, code review, or handoff.

Formatter example

A one-line SVG becomes easier to review after formatting.

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 96" role="img"><title>Check badge</title><rect width="160" height="96" rx="14" fill="#0e7c66"/><path d="M39 55l18 18 64-64" fill="none" stroke="white" stroke-width="10" stroke-linecap="round" stroke-linejoin="round"/></svg>

SVG Formatter FAQ

Will formatting change the SVG image?

Formatting only changes whitespace and indentation. Preview the result to verify rendering.

Can I format SVG icons?

Yes. Icons, logos, and copied snippets can all be formatted for review.