SVG Code Viewer — Live Preview
Paste SVG markup and see it render live. Scripts in the SVG never run, so unknown code is safe to preview.
Live preview
Paste valid SVG code to preview.
Supported formats
Supported input formats: SVG code
Paste SVG code and see it rendered instantly. Useful when an icon copied from a design tool, a library or a chat message needs a quick look before it goes into a project.
You can also paste anywhere on the page: if the clipboard holds SVG markup, it is loaded into the editor automatically.
When the preview stays blank
Add the namespace. SVG copied out of an HTML page often lacks xmlns="http://www.w3.org/2000/svg". Inside HTML that is fine; as a standalone image it is not, and nothing renders. Add the attribute to the opening <svg> tag.
The markup has to be valid XML. Standalone SVG is stricter than SVG inside a web page. An unclosed tag, an attribute without quotes or a bare & in text stops the whole drawing from showing.
Give it a size. Without width, height or a viewBox the browser has no idea how big the drawing is. A viewBox such as viewBox="0 0 24 24" is enough for icons.
Safe for SVG you did not write. The preview renders the code as an image, the same way an <img> tag would. Scripts inside the SVG do not run and external files are not fetched, so pasting unknown markup cannot do anything to the page.
Common questions
Why is my SVG preview blank?
Usually the opening tag is missing xmlns="http://www.w3.org/2000/svg", or the code is not valid XML. Add the namespace, close every tag and escape & as &.
Why does my SVG look different here than in my app?
The preview draws the SVG as a standalone image. CSS from your site does not reach it, linked fonts and images are not loaded, and scripts do not run.
Can I export the SVG as PNG?
Save the code as an .svg file and use the SVG to PNG converter, which lets you set the output size.
Is the code sent anywhere?
No. It stays in your browser.