SVG to PNG / JPG Converter
Rasterize SVG files at any resolution. Pick a scale, set a background, download a PNG or JPG.
What this converter does
SVG is great for logos and icons because it scales infinitely without blur, but a lot of platforms still want a flat raster file: app icon submissions, social media uploads, embedded email images, OS wallpapers. This tool takes any SVG — file or pasted markup — and rasterizes it to PNG (with optional transparency) or JPG (with a forced background) at the resolution you pick. Choose 1×, 2×, or 4× the SVG’s natural size, or set a custom width in pixels and the height is calculated to preserve aspect ratio. The whole pipeline runs in your browser using a <canvas> element: your SVG never leaves this tab. That matters for proprietary brand assets, unreleased designs, or any file you can’t hand to a random web service. The preview updates live as you change settings, so you can see how the background and resolution affect the final image before you click download. There’s also a JPG mode for cases where you need the smallest possible file and don’t need transparency — social cards and dense thumbnails, mainly.
How to use it
- Provide the SVG — Drop a file or paste the markup. The SVG must include a
viewBoxor width/height attributes; otherwise the browser doesn’t know how big to draw it. - Pick scale and format — 1× matches the SVG’s nominal size. 2× is great for retina screens. 4× for print. Custom lets you target an exact pixel width, like 1200px for OG images.
- Set the background — Transparent works for PNG only. JPG needs a solid background — white is the safe default, but pick anything that complements the artwork.
- Download — Hit download. The PNG is generated locally and saved with a sensible filename — no server round-trip.
What’s happening under the hood
We base64-encode the SVG markup into a data:image/svg+xml;base64 URL and assign it to an HTMLImageElement. Once the browser has parsed and laid out the SVG, we draw it onto a canvas sized to the chosen resolution — the browser handles the rasterization, so the result matches what Chrome or Safari would render natively. The canvas is then encoded to PNG (lossless) or JPG (lossy, quality 92). Width and height are derived from the SVG’s viewBox or explicit attributes; aspect ratio is always preserved.
When to choose PNG vs JPG
Use PNG for logos, icons, and any artwork with sharp edges or text — lossless compression keeps lines crisp, and you can keep transparency. Use JPG only for photo-like SVGs or cases where you need the smallest possible file and a solid background is acceptable. JPG’s block-based compression mangles thin lines and hurts contrast on flat color regions, so it’s rarely the right pick for vector artwork.
Frequently asked questions
Why does my SVG render blank?
viewBox and explicit dimensions, so the browser sizes it to 0×0. Add viewBox="0 0 W H" to the root <svg> and it should render.Can the SVG reference external images or fonts?
<image> URLs, web fonts loaded via CSS) often fail because the conversion runs in a privacy-sandboxed context. Inline the fonts and any embedded images into the SVG before converting and the output will be pixel-perfect.
EN
PT
ES