XTools Logo
XTools
Blog
/
SVG PreviewSVG to PNGSVG to JPGSVG to PDFPNG to SVGJPG to SVGSVG OptimizerSVG Blob Generator

© 2026 XTools. All rights reserved.

Privacy PolicyContact Us

    SVG Preview

    Preview SVG files and view source code
    • Files never leave your device
    • Runs in your browser
    • Free, no sign-up, no watermark

    Drop SVG files here, or click to choose

    Accepts SVG, SVGZ · You can also paste with Ctrl+V / ⌘V

    1

    Tip: paste SVG code anywhere on this page with Ctrl+V / ⌘V.

    Related tools

    • SVG to PNG
    • SVG to JPG
    • SVG to PDF
    • PNG to SVG
    • JPG to SVG
    • SVG Optimizer
    • SVG Blob Generator

    How to use SVG Preview

    Open SVG files or pasted code and inspect them safely: zoom, pan, switch the background, and read the rendered size, width, height, viewBox and element count. Edit the source with a live preview; scripts in the file never run.

    1. 1

      Drop SVG or SVGZ files on the page, or paste code into the box and click Add SVG. Pressing Ctrl+V anywhere on the page works too.

    2. 2

      Switch the background between Checker, White and Black, and zoom with the buttons, Ctrl/⌘ + scroll or the keys + − 0 1; drag to pan and double-click to fit.

    3. 3

      Read the Details panel: Rendered size, width, height, viewBox, File size and Elements. Hover over the drawing to see coordinates in SVG units.

    4. 4

      Edit the code under Source. The preview updates as you type, and syntax errors name the line and column.

    5. 5

      Under Export, click Download SVG or Copy data URI.

    Frequently asked questions

    Is it safe to open an SVG from an unknown source?

    Yes. The SVG is shown only as an image, so scripts and event handlers in it never run, and files it links to on the web (images, fonts, stylesheets) are not loaded. Nothing is uploaded.

    Why does my SVG show here but not in a browser tab or an img tag?

    It is probably missing the xmlns declaration. The preview adds it automatically and shows a note; click Add it to the code to fix the source, then download it.

    Why is the size shown as 300 × 150?

    The SVG has neither width and height nor a viewBox, so the browser default applies. When only width and height are missing, the size comes from the viewBox.

    What does Copy data URI give me?

    A URL-encoded data:image/svg+xml string you can paste into a CSS background-image or an img src. For a Base64 version or a smaller file, run it through the SVG Optimizer.

    Can I open .svgz files?

    Yes. Gzip-compressed SVGZ files are unpacked in your browser, and Download SVG saves the code as a plain .svg file.