SVG Viewer

Paste SVG markup and watch it render, with well formedness checked before anything is drawn.

SVG markup
Preview
Runs locally in your browser

About the SVG Viewer

An SVG is XML, which means it either parses or it does not, and a single unclosed tag or unquoted attribute stops the whole picture from appearing. This viewer parses your markup first and reports what the XML parser objected to, so you get a message about the problem instead of an empty white box. Only once the document is well formed and its root element really is <svg> does the render happen.

The preview runs inside a sandboxed frame with scripting disabled, so it is safe to inspect an SVG that arrived by email or came out of an untrusted export. Four backdrops are available because so many SVG problems are invisible on the wrong one: white strokes vanish on white, and a missing fill attribute is only obvious on the checkerboard. The scaling menu switches between fitting the pane, drawing at the declared width and height, and stretching to fill.

The status line summarises the declared size or the viewBox and counts the drawing elements found, which is a quick way to spot an icon that has been exported with 4000 stray paths. Use the Upload button to open a .svg file straight from disk. To make the markup easier to read first, run it through the XML Formatter.

How to use

  1. Paste the SVG markup, or click Upload to open a .svg file.
  2. Pick a Backdrop that contrasts with the artwork.
  3. Switch Scaling to Actual size to check the declared dimensions.
  4. Fix any XML error reported above the preview and it re-renders as you type.

Common questions

Why does my SVG show an XML error?
SVG follows XML rules, so every tag must be closed and every attribute quoted. The message names what the parser found at the point it gave up.
Will scripts inside the SVG run?
No. The preview frame is fully sandboxed, so any script or external reference in the file is inert.
Nothing appears even though the markup parses. Why?
The most common causes are a missing viewBox with zero width and height, shapes drawn outside the viewBox, or a fill that matches the backdrop.
Can I save the SVG from here?
Yes, the Download button writes the markup back out as image.svg.