Paste SVG markup or upload an .svg file. Download PNG (keeps transparency) or JPG (white background) at 500–2000 px. Conversion runs in your browser. Nothing is uploaded.
Paste SVG markup (must contain an <svg> element) or upload a file up to 500 KB. Your code stays in your browser and is never sent to a server.
Your SVG will appear here once you paste or upload code.
PNG preserves transparency. JPEG uses a white background. Clipboard copy is PNG.
Guides · Transparent PNGs from SVG · SVG code to JPG · SVG code to SVG file · SVG to JPG · SVG viewer
Features
Paste or upload
Paste SVG markup, or open an .svg file up to 500 KB.
Formatting
Pasted and uploaded markup is tidied with Prettier so it is easy to read and edit.
Code editor
Edit the markup with syntax highlighting and line numbers. Clear starts over.
Scripts removed
Scripts, event handlers and foreignObject are stripped before the SVG is drawn.
Live preview
The SVG redraws as you type. Errors show next to the code.
Export size
The final image size in pixels is shown before you download.
Free sizes
500, 1000, 1500 or 2000 px on the longest edge. The aspect ratio is kept.
PNG
Keeps the transparent background.
JPG
Drawn on a white background, for forms and apps that want JPG.
Copy PNG
Put the PNG on the clipboard to paste into a doc or chat.
SVG file
Save the markup as an .svg file.
Larger sizes Pro
3000 or 4000 px, or any custom size from 100 to 8000 px.
WebP Pro
A smaller file than PNG for the web, with transparency.
Batch to ZIP Pro
Convert up to 50 .svg files at once into one ZIP of PNGs. File names are kept.
Three steps. The conversion runs in your browser.
Paste SVG markup from your editor, design tool, or icon library, or upload an .svg file directly. The tool accepts any valid SVG code, including ones exported from Figma, Illustrator, or Inkscape.
See an instant live preview of your SVG rendered as an image. The SVG is sanitized to remove any unsafe content, keeping the rendering safe and the output clean.
Pick an output size (500 – 2000 px, longest edge), then click Download PNG or Download JPEG to save the image, or copy it straight to your clipboard to paste anywhere.
Copy the <svg>…</svg> element from the page HTML and paste it into the editor. Then export PNG, JPG, or an .svg file.
<svg viewBox="0 0 24 24">
<circle cx="12" cy="12" r="10" />
</svg>foreignObject elements are removed. use elements are removed too, whether they point at an id in the file or at another site. An image link to another site stays in the markup. PNG is the default when you need a transparent background. Download at 500–2000 px on the longest edge so icons stay sharp on a page or in a slide. JPG is smaller but always sits on white, so use PNG for logos and diagrams that have to sit on a colored background.
Why convert SVG to image?
SVG is the best format for vector graphics, but not every platform supports it. Converting your SVG code to a PNG or JPEG image lets you use it anywhere.
Twitter/X, LinkedIn, Slack, and most chat apps only accept raster images. Convert your SVG icon or diagram to PNG and share it anywhere.
Google Slides, PowerPoint, and Word handle PNG and JPEG reliably. Export your SVG illustration at high resolution for crisp results in any document.
Most email clients do not render SVG. Convert your SVG logo or banner to PNG to make sure every subscriber sees it correctly.
Paste code, pick a theme, and download a PNG with syntax highlighting. 1x needs no account.
Open Code to imageUse our free HTML code to image converter to turn any HTML markup into a PNG or JPEG, right in the browser, with no account needed.
HTML code to image converterFAQ
Everything you need to know about the SVG code to image converter.
An SVG code to image converter turns SVG markup into a PNG or JPG file. On this page you paste SVG or upload an .svg file, see a live preview, and export PNG (keeps transparency) or JPG at 500 to 2000 px. It runs in your browser with no account needed.
Paste your SVG markup into the editor on this page, or click "Upload .svg file" to load a file from your computer. The tool renders a live preview instantly. When you're happy with it, click Download PNG or Download JPEG to save the image. No account needed.
Yes. It runs in your browser with nothing to install and no account, and you can download a PNG or JPG.
PNG keeps transparency and does not add a background. JPG is a smaller file and always uses a white background. Clipboard copy is PNG.
Yes. Click Upload .svg file to pick an .svg file from your computer. The tool reads the file, renders a preview, and lets you download it as PNG or JPEG in one step.
No. Preview and export run in your browser. The SVG is not sent to a server for conversion.
To protect you from malicious code, all SVG input is sanitized before rendering. This may strip certain advanced features such as embedded scripts, foreignObject elements, or external resource references. If your SVG relies on custom fonts or external images, those might not load. For complex SVGs that need full browser rendering, open the raw file directly in your browser.
No. This tool goes in the opposite direction: from SVG code to a raster image (PNG or JPEG). Converting a photo or raster image to SVG (vectorization/tracing) is a different process. Tools like Inkscape or online vectorizers handle that.
If you have an .svg file, open it in any text editor (VS Code, Notepad, etc.). The raw text is the SVG code. For icons, many libraries like Lucide, Heroicons, and Font Awesome provide a "Copy SVG" button on their websites. Figma can also export selected elements as SVG code via Right-click → Copy as → Copy as SVG.
SVG (Scalable Vector Graphics) is an XML-based format that describes images mathematically, so they scale perfectly at any size. However, many apps, social media platforms, and email clients do not support SVG and only accept PNG or JPEG. Converting SVG to an image lets you use your vector graphics anywhere, without loss of quality.
You can export the image at four free sizes: 500 px, 1000 px, 1500 px, 2000 px. Pro adds 3000 px, 4000 px, and a custom size from 100 to 8000 px. The size refers to the longest edge: your SVG is scaled proportionally so that whichever dimension (width or height) is larger matches the chosen value. The default size is 1000 px. Choose a larger size for high-resolution images, or a smaller one to keep file sizes compact.