Pretty Print SVG Markup

Expand minified SVG onto one tag per line — do not minify, do not rewrite path data

Optimize SVG? Optimize SVGRemove XML declaration? Remove XML declaration

FAQ

Quick answers

How do I pretty print SVG markup?
Click Pretty print. The serializer writes one element per line so a minified export is readable in the editor. Nothing in the tree is deleted.
Is pretty print the same as Pretty Print SVG Markup?
No. Optimize minifies: comments, unused ids, and metadata go away and the file shrinks. Pretty print is the opposite direction — readable source, same bytes of geometry.
Does formatting change path data or viewBox?
No. d, viewBox, fills, and width/height stay exactly as parsed. Round Path Decimals or Snap to Pixel Grid if you want numbers rewritten.
Will pretty print minify the file?
No. Output is usually a few bytes larger because of newlines. Use Pretty Print SVG Markup or Reduce SVG File Size to compact.
Optimize SVG → Remove XML declaration → Remove empty attributes → Strip metadata →
Open full editor →

Source

Type or paste SVG markup. The preview on the right updates as you type.

Ready

Live preview

PNG export · 2× for retina