Beautify, indent, sort attributes, and format SVG XML markup cleanly in your browser
Drop an SVG to format its code
Or press Ctrl/⌘ V to paste a file or code. Runs 100% locally in your browser.
Format single-line or messy SVG markup with 2 spaces, 4 spaces, or tabs, and optionally put each attribute on its own line for clean git diffs.
Sort attributes alphabetically (keeping id, viewBox, width, and height first), strip comments, or collapse back into a single-line string.
This free SVG formatter parses and formats XML locally in your browser. Nothing is uploaded, and there is no sign-up or watermark.
Copied a single-line minified SVG from production, a design export, or a data URI and need readable markup? This SVG formatter pretty-prints your vector XML locally in your browser with customizable indentation, attribute sorting, multiline attribute wrapping, and comment cleanup—while showing a live visual preview so you know the graphic stays intact.
Beautify and indent SVG markup in three steps:
More free browser-based vector converters and editors in MintConvert.
Turn SVG into clean HTML, JSX, React, Vue, Svelte or CSS code
Generate crisp vector QR codes with custom shapes, colors and logos
Generate crisp vector barcodes (CODE128, EAN-13, UPC, Code 39) as SVG
Encode SVG files to Base64 Data URIs, CSS rules, or decode Base64 back to SVG
Check SVG XML syntax, viewBox, namespaces, broken references, and security issues
Export 1x–8x high-DPI transparent PNGs from vector files