SVG Preview Editor

A two-pane editor for SVG. Type or paste markup, and the rendered image updates as you edit. If the markup is invalid, the tool shows the parser's error message instead.

Use the tool

Why this tool exists

When you are tweaking an icon, fixing a path, or debugging why an exported SVG looks wrong, switching between a code editor and a browser tab is slow. A syntax slip, such as a missing quote or an unclosed tag, makes the image vanish with no explanation.

Type into the editor and, after a short pause, the image redraws. The XML parser checks the code and reports the first error it finds, and the root element must be an svg. The preview sits on a white background with a height cap, and the byte size of your code is shown so you can see the effect of your edits. The image is rendered as an image element, so scripts in the SVG do not run. Everything stays in your browser.

How to use it

  1. Paste or write SVG code in the editor.
  2. Watch the preview update.
  3. Fix any parser error shown in place of the image.
  4. Copy the finished code, or optimise it with the SVG optimizer.

Frequently asked questions

What counts as an error?

Anything the browser's XML parser rejects, such as unclosed tags, bad attributes or unescaped characters, or a document whose root element is not svg. The first line of the parser message is shown.

Do scripts and animations work?

Scripts do not run, because the code is displayed as an image. CSS and SMIL animations inside the SVG may play, depending on your browser, while external resources are blocked.

Can I make the preview larger?

The preview scales within a maximum height. To control the size, set width and height or a viewBox in the SVG itself.

Does it save my work?

No. Nothing is stored or uploaded, and the editor starts again from its sample code when you reload the page. Copy your finished SVG somewhere safe before you close the tab or navigate away.