SVG Viewer

Preview SVG markup without uploading a file

Free SVG viewer to open SVG in the browser. Paste markup or drop an .svg file, check the preview, then copy, download, or grab a data URI. Everything stays on this page.

Markup

Drop an .svg file onto the editor. Preview never leaves this tab.

Preview

SVG at a glance

Common attributes

xmlnshttp://www.w3.org/2000/svg
viewBoxmin-x min-y width height
width / heightCSS size of the drawing
fill / strokePaint for shapes

Why use this viewer

SourcePaste or local file
NetworkNone. It stays in the tab
ScriptsBlocked in the preview iframe
ExportCopy, data URI, download

SVG viewer guide

What an SVG viewer does

SVG is XML. Browsers already know how to draw it, but opening a raw file in an editor does not show size, viewBox, or transparency. An SVG viewer puts the markup next to a live preview so you can confirm icons, logos, and diagrams before you commit them.

This page parses the text with DOMParser, draws it in a sandboxed iframe, and lists width, height, viewBox, and how many elements sit under the root.

viewBox vs width and height

viewBox is the internal coordinate system. width and height are how large the graphic appears on the page. Keep them in the same ratio unless you want stretching. If the preview looks cropped, the paths probably sit outside the viewBox.

Data URIs and QR SVG

A data URI inlines the graphic. Handy for a one-off CSS background. Bad for a 200 KB illustration you reuse on every page.

If you exported SVG from the QR Code Generator, paste it here to check quiet zone and contrast on light or dark. Messy HTML around an inline SVG can go through the HTML Beautifier first.

SVG viewer FAQ

How do I view an SVG file online?

Paste the markup or drop the .svg file onto the editor. The preview updates in this tab. Copy, copy a data URI, or download as needed.

Is it safe to preview SVG in the browser?

SVG can include script. The preview iframe has no script permission, and the file is not uploaded. Still treat untrusted SVG as untrusted markup.

What is a viewBox?

viewBox is min-x, min-y, width, height in user units. The browser maps that box onto the element size. Mismatched ratios stretch or crop the drawing.

How do I turn SVG into a data URI?

Click Copy data URI. Paste it into an img src or a CSS background-image. Prefer a real file when the same graphic appears in many places.

Why is my SVG blank?

Fill may match the background, xmlns may be missing, size may be 0, or the viewBox may miss the paths. Switch Checker / Light / Dark and read the meta line.