IMAGES / SVG VIEWER

SVG reader and viewer

This SVG reader works as an SVG file viewer online: open an SVG or SVGZ file, or paste SVG code, and your browser draws it straight away. The preview opens fitted to the view and stays sharp at any zoom. Below it you get the pixel size, viewBox, declared colors, fonts, content warnings and the source.

Open an SVG

Or drop a file here. It opens straight away and is never uploaded.

Preparing tool…

Preview

Your SVG appears here as soon as you choose, drop or paste it.

Shown as an inert image. Your browser draws the SVG as a picture, so scripts, event handlers and links never run, and external images, stylesheets and web fonts inside the file are not loaded, which can change how it looks. Text uses fonts installed on this device. Animations play. The download is your original file, unchanged.

How to view an SVG file

Select Choose SVG file, drop a file anywhere on the tool, or paste markup into the Or paste SVG code box. A chosen file opens at once, and pasted code opens 0.3 seconds after you stop typing. Use example loads a 240 × 160 sample with a circle and a triangle, so you can try the controls first.

The preview starts fitted to the view, and Fit and 100% return to the fitted view or the actual size. The minus and plus buttons change Zoom (%) by a factor of 1.25, and you can type any value from 1 upward. Drag to pan, pinch, or hold Ctrl or ⌘ and scroll to zoom at the pointer. With the preview focused, the arrow keys pan, 0 fits and 1 shows 100%.

  1. Select Choose SVG file, drop a file on the tool, or paste SVG code.
  2. Zoom, fit and pan the preview, and pick a Background.
  3. Read the Details and expand Source code.
  4. Select Copy source or Download original.

What the details show

Size in pixels is the size a browser gives the SVG as a standalone image. Absolute units convert at 96 pixels per inch, so a width of 2in and a height of 1in read 192 × 96 px, and 72pt by 36pt read 96 × 48 px. When a side is missing or a percentage, it comes from the viewBox; with no viewBox either, browsers fall back to 300 × 150.

Declared width × height repeats the attributes as written, units included. Aspect ratio reduces whole-pixel sizes, so 240 × 160 reads 3:2 (1.5:1). Elements counts every tag and names how many are paths.

Colours declared lists fill, stroke and other color values from attributes and style rules, each with a swatch, and Fonts referenced lists the font-family names. Each list shows 24 entries, then a count of the rest. Title and Description come from the first title and desc elements directly inside the root.

Active content and a safe SVG preview

Browsers draw an SVG shown through an image element in a restricted mode, and this page uses that mode for its preview. Scripts and event handlers do not run, links cannot be followed, and images, stylesheets and web fonts that the file references from outside are not fetched. SMIL and CSS animations still play. Text falls back to fonts installed on this device.

When the file holds script elements, event handler attributes such as onload, javascript: links, references to external files, or embedded HTML in a foreignObject, a notice above the Details counts each kind. Titles, descriptions, colors and the source are shown as plain text, never as markup. The reader does not clean the file. Download original saves the bytes you opened, so another program that opens the download may still run or load what the notice lists.

Limits

Only well-formed XML with an svg root element opens, so an unclosed tag gives a not well-formed error. A PNG or an HTML page renamed to .svg is reported as not an SVG, because the extension alone does not decide. Text must be UTF-8; markup saved in another encoding gets an error that asks you to save it as UTF-8. Simple text entities declared inside the file are expanded, while external, nested or markup entities are refused, and SVGZ opens when your browser supports gzip decompression.

You open one file at a time. If a file fails, the one already open stays on screen. There is no file size limit, but a very large drawing can make the browser pause while it draws, and source longer than a million characters fills the Source code box only when you expand it. An SVG with a width or height of zero has nothing to draw; its details and source still appear.

Questions

How can I read an SVG file?

Open it with Choose SVG file, drop it on the tool, or paste its code. The drawing appears in the preview, and the Details list its pixel size, viewBox, colors and fonts. Expand Source code to read the markup itself, or select Copy source to take it into a text editor.

How can I view SVG code?

Open or paste the SVG, then expand Source code below the Details. The SVG source box is read only, so nothing typed there changes the file. Copy source puts the text on your clipboard. If the browser blocks the clipboard, the page selects the source instead, so you can copy it with the browser's own command.

I can't open an SVG file. What can I do?

Read the error message above the paste box. It says whether the content is not an SVG, is not well-formed XML, is not UTF-8 text, relies on entities this reader does not expand, or is a damaged SVGZ. Fix that one problem in a text editor, or export the file again from the program that made it.

Can Google Chrome open SVG files?

Yes. Chrome draws SVG natively, and this reader uses that same renderer through an image element, so the preview shows how your browser draws the file as a picture. Around it the page adds typed zoom from 1 percent upward, four background choices, the size and viewBox readout, a list of active content and the source code.

Is it safe to open an SVG I do not trust?

The preview runs no scripts or event handlers, follows no links and fetches nothing from outside the file, because the browser draws it as a restricted image. Text from the file is shown as plain text. The file itself is not cleaned: Download original is the unchanged file, and other programs may run what it holds.

Why does the preview look different from another program?

External images, stylesheets and web fonts that the file references are not loaded here, so those parts go missing or fall back. Text uses fonts installed on this device. Animations written in SMIL or CSS play, while anything driven by scripts or pointer interaction stays still, since the preview is an inert image.

What does the checkerboard background mean?

The checkerboard marks transparent areas: wherever the squares show, the SVG draws nothing. Switch Background to White or Dark to check artwork meant for a light or dark page, or choose Custom colour and enter a six-digit hex value. The background only affects the view here and is never added to the file you download.

Are my files uploaded?

No. The file or pasted code is read and inspected by a worker in your browser, and the browser itself draws the preview. This tool does not upload, log or save your files, filenames or pasted code. Clear, opening another file or leaving the page releases the preview and the download link.