SVG Viewer

Open an SVG file or paste its code. It is shown as an image, so nothing inside it runs, and the report lists its size, its elements and anything active in the markup.

Drag & drop a file here, or

SVG Or paste SVG code below • Read in your browser • Nothing uploaded

Runs in your browser

Shown, Never Run

The file is drawn as an image. Browsers never run scripts or fetch outside files inside an image, so opening an unknown SVG here runs nothing it contains.

Size With Its Units

Millimetres, points and inches are converted at 96 px per inch and named. A size in percent or em, or a file with only a viewBox, is reported as not fixed rather than guessed.

Privacy-First

The file is read on your own device. Nothing is uploaded, nothing is stored, and no account is needed. Close the tab and it is gone.

Advertisement

How it works

Why the preview is an image

An SVG is code as much as a picture. It can carry scripts, event handlers such as onload, embedded HTML and links that fetch files from other servers. Opened in its own browser tab or pasted into a web page, that code can run. This viewer draws the file as an image instead, and browsers never run scripts or load outside files inside an image. Nothing is rewritten or stripped – the file is simply shown in the one mode where its code cannot do anything.

What the report looks for

The markup is read once, element by element. The report counts every element and lists script elements, on* event handler attributes, foreignObject blocks, iframe, object and embed elements, javascript: links, data: URLs that are not plain images, DOCTYPE entity declarations and any href, src or CSS url() that points outside the file. It lists what it found; it does not call a file safe, because no reader of markup can promise that.

An SVG size is not always a pixel size

Width and height can be written in px, mm, cm, in, pt or pc, and those convert to pixels at the CSS rate of 96 px per inch – the report names the unit it converted. A width of 100% or 10em has no pixel value until a page places the image, and a file with only a viewBox has no fixed size at all. In those cases the report says the size is not fixed by the file instead of printing a number that only looks exact.

Missing pieces in the preview

Because the preview never loads outside files, an SVG that pulls in a remote image, font or stylesheet is shown without it, and the report says so and lists the addresses. Fonts that are not installed on your device fall back to a default. If the markup is broken, the browser may refuse to draw it at all; the report is still read from the text, so you can see what the file contains either way.

Frequently Asked Questions

How do I open an SVG file online?

Click Open SVG and pick the file, or paste the SVG code and press View. The picture appears with zoom and background options, followed by a report of its size, its elements and anything active in the markup, and the source code itself.

Is it safe to open an unknown SVG here?

The viewer shows the file as an image, and browsers never run scripts or fetch outside files inside an image, so nothing the file contains runs on this page. That is a statement about this preview, not about the file: the same SVG opened in its own tab or pasted into a web page can run its code, and the report lists anything that could.

Does the viewer remove scripts from my SVG?

No. It does not change the file at all. It shows it in a mode where scripts cannot run and tells you which scripts, event handlers and links are in it, so you can decide what to do with the file.

Why does the report say the size is not fixed?

Because the file does not fix it. A width or height in percent or em depends on where the image is placed, and a file with only a viewBox has proportions but no size. The report names the reason and says what the preview used, instead of inventing a pixel number.

How are mm, pt and inch sizes converted?

At the CSS rate of 96 px per inch: 1 in is 96 px, 1 pt is 1.33 px, 1 mm is about 3.78 px. The report names the unit it converted from, so a 10 mm wide file reads as 37.8 px and says where that number came from.

Why is part of my SVG missing in the preview?

An image that loads a remote picture, font or stylesheet shows without it here, because the preview never fetches outside files. The report lists those addresses. Text in a font you do not have installed falls back to a default font.

Can I convert the SVG to PNG?

Yes. The Convert to PNG button opens the SVG to PNG tool, which draws the file on a canvas at the scale or exact size you choose and saves it as a PNG.

Is my file uploaded?

No. The file is read by your own browser. There is no server call, no storage and no account, and closing the tab discards it.