SVG viewer and code editor

See what an SVG looks like the moment you paste or open it. Edit the markup and the preview follows; zoom in, switch to a light or dark background, or go full screen. Optimize or prettify the code, rotate or flip the drawing, set its width, height and viewBox, undo any step — then copy or download it, or continue in another tool. Even files of many megabytes stay responsive.

Loading the tool…

How to use it

  1. 1

    Paste SVG code, drop a file, or pick one from your device.

  2. 2

    Edit the code, or use Optimize, Prettify, Rotate, Flip and the dimensions fields — the preview follows.

  3. 3

    Copy or download the SVG, or continue in the editor, the optimizer or a converter.

Questions

Is it safe to preview an SVG from somewhere else?

Yes. Scripts, event handlers and external references are stripped before anything is rendered, so an SVG can't run code on this page.

Why is my SVG blank?

Common causes are a missing viewBox with no width and height, content drawn outside the viewBox, or fills and strokes set to none. The declared size readout and the dimensions fields help with the first two; try the dark or light background for white or black artwork.

How do I rotate or flip an SVG?

Use the rotate and flip buttons. The drawing is wrapped in a transform and the viewBox is moved to match (width and height swap on a quarter turn), so the result stays exactly in frame and stays a vector.

How do I make an SVG scalable?

Give it a viewBox — the drawing's coordinate box — and remove fixed width and height if it should fill its container. The dimensions fields edit all three.

Can I format or minify SVG code?

Yes. Prettify indents the markup one element per line; Minify puts it on one line; Optimize also removes editor metadata and rounds numbers with SVGO, showing how much smaller the file got.

Can I edit the SVG visually?

Yes — open it in the full editor to move, resize, recolor and restyle shapes with the mouse or touch, with the code kept in sync.

More free SVG tools

Need more than one change?

The Splice editor edits SVGs visually — shapes, text, colors, layers — across many files at once, with the code in sync.

Open the editor