Images & SVG
SVG Formatter
Paste SVG markup to beautify it with clean indentation or minify it to a single compact line. A live preview updates as you type and nothing is uploaded — your SVG never leaves the page.
Format
liveSVG input
paste or type
Checked with a built-in SVG/XML parser. Tags and attributes keep their exact
case, and text content inside <text>, <style>
and <script> is never reflowed.
Result
preview & code
Common causes: unclosed or mismatched tags, unescaped
& or <, unquoted attribute values, or more
than one root element.
The rendered SVG appears here.
How it works
The input is parsed and checked for XML well-formedness in this tab, then rebuilt
from the parsed tree. Beautify re-indents elements and attributes
while leaving mixed text content inline; Minify collapses the
whitespace that sits between tags and can drop comments, while text inside
<text>, <style> and <script>
is preserved exactly. When markup is malformed the offending line, column and a
source excerpt are shown, and a best-effort result is still produced when the
structure is recoverable. The preview renders the result inside an
<img> data URI, so any scripts in a pasted SVG stay inert.
Nothing is uploaded and no network request is made.