NathanTools
NathanTools
Text Tools 13
SEO Tools 7
Image Tools 19
YouTube Tools 38
Device Tests 4
PDF Tools 10
Calculators 52
Electrical Calculators 10
Time Tools 7
Random Tools 9
Converters 14
Developer Tools 11
Hash Generators 5
Password & Security 2
Network & DNS 3
Website Tools 9

SVG Viewer & Editor

Paste or open an SVG to preview it live, edit the code, and export it as PNG or a data URI.

100% free No sign-up Works on any device

SVG code

Preview

SVG preview

Updated November 2026 · Runs in your browser; files are never uploaded

How to use the SVG viewer

  1. Paste SVG code, drop an .svg file on the code panel, or press Open.
  2. Edit the code; the preview updates as you type. Change the background or zoom to inspect it.
  3. Format or Minify the code, then download it as SVG or PNG, or copy a data URI for CSS.

SVG basics

ElementDrawsExample
<rect>Rectangle<rect x="10" y="10" width="80" height="40" rx="6"/>
<circle>Circle<circle cx="50" cy="50" r="40"/>
<line>Straight line<line x1="0" y1="0" x2="100" y2="100" stroke="black"/>
<path>Any shape<path d="M10 80 Q 50 10 90 80"/>
<text>Text<text x="10" y="30">Hello</text>

The viewBox attribute sets the coordinate system, so the drawing scales to any width and height without losing quality. For bitmaps, use the image resizer; to embed small images as text, try Base64.

Frequently asked questions

Drop the file on the editor, open it with the button, or paste the SVG code. The preview updates as you type, so you can edit the code and see the result straight away.

Yes. SVG files can contain scripts, so the preview is rendered as an image, where browsers never run scripts or load external resources. The file stays in your browser and is never uploaded.

Open or paste the SVG, choose a width for the PNG, and press PNG. The image is rendered at that size, so it stays sharp; vector graphics can be exported at any resolution.

Common causes: the code is missing the xmlns="http://www.w3.org/2000/svg" attribute (the editor adds it when it can), a tag isn't closed, or the SVG has no width, height or viewBox, so it renders at zero size. The status line under the editor reports parse errors.

The SVG encoded into a URL, like data:image/svg+xml,…, which you can put directly in CSS background-image or an img src without a separate file. The editor creates a URL-encoded version, which is smaller than Base64 for SVG.
Esc
↑ ↓ to moveEnter to open