IMAGES / SVG TO RASTER

SVG to image converter

This SVG to image converter turns an SVG file or pasted SVG code into a PNG, JPEG or WebP picture. It draws the vector shapes at the pixel size you set, on a transparent or solid background, and the conversion runs in your browser. The preview is decoded from the exact file you download.

1. Add your SVG

Or drop a file here, or paste SVG code below.

No SVG yet. Nothing is uploaded.

Preview

Your image appears here as soon as you add an SVG.

Add an SVG to see the image you will download.

How to convert an SVG to an image

Add the SVG, choose an output format, check the preview and download it. The first image appears as soon as the SVG loads, drawn as a PNG at the size the SVG declares.

  1. Select Choose SVG file, drop a file on the Add your SVG area, or paste markup into the SVG code box. Try an example loads a small drawing to test with.
  2. In Output settings, pick PNG, JPEG or WebP under Output format. JPEG and WebP add a Quality (1–100) field that starts at 90.
  3. Set Width (px), Height (px) or Scale from original, and choose a Transparent or Solid color background.
  4. Select the download button, which names the format, such as Download WebP.

The saved file joins the SVG's name and the pixel size, so logo.svg at 800 × 600 pixels saves as logo-800x600.webp. Start over clears the SVG, the settings and the image.

PNG, JPEG or WebP: choosing the format

Pick PNG when the image needs sharp edges and transparent areas, JPEG when the place you upload it to does not accept transparency, and WebP for the smallest file in the test below. Output format holds all three, and a change renders a new preview.

Output formatTransparent areasQualityExample at 400 × 300At Scale 4 (1600 × 1200)
PNGkeptnone, lossless8.58 KB64.29 KB
JPEGfilled with the Background color, white at first1 to 100, starts at 907.01 KB32.83 KB
WebPkept1 to 100, starts at 904.19 KB17.69 KB

The sizes come from the 200-byte Try an example drawing, converted in Chrome 153. Other drawings and browsers give other numbers. Every result is larger than that SVG, which is normal when a vector file becomes pixels. WebP needs the browser's own WebP encoder; without one, the tool shows an error and suggests PNG.

Picking the pixel size

The image starts at the size the SVG declares, shown as Original size in Output settings. It is read from the width and height of the root svg element, where an inch counts as 96 pixels and an em as 16. A viewBox fills in a missing side, and an SVG with no size information at all becomes 100 × 100 pixels.

Scale from original multiplies both sides, so Scale 4 turns the 400 × 300 example into 1600 × 1200. Typing a new Width (px) with Lock aspect ratio on sets the matching Height (px). With the lock off, the drawing fits inside the new box with centered padding, never stretched or cropped.

Vector shapes are drawn at the output size, so a larger image gains real detail at its edges. Bitmaps embedded in the SVG are the exception, as they only have their own resolution. Above 800 pixels the preview is scaled down, while the download keeps the full size.

What a still image leaves out

The converted image is a still picture of the SVG, rendered by resvg in WebAssembly. Scripts and animation do not run, embedded HTML is not drawn, and colors are rasterized to sRGB. Editable shapes and SVG metadata do not carry over into the pixels.

Text is set in the bundled DejaVu Sans font, whatever font the SVG asks for. Images, fonts and stylesheets that the SVG links from other files or servers are not fetched, so they are missing from the result. Some filters and less common SVG features can render differently or drop out, so check the preview first.

The tool sets no cap on file size or pixel count. A size beyond what the browser's canvas or memory can handle ends in an error that keeps your SVG and settings for a smaller try. Files are read as UTF-8 or UTF-16 text, gzip-compressed SVGZ included, and an SVG that declares external entities is refused.

Questions

How can I convert an SVG file to an image?

Open the file with Choose SVG file or drop it on the page. The tool draws it right away as a PNG at the SVG's own size. Change Output format to JPEG or WebP if you need another type, adjust the size, then select the download button to save the image to your device.

Can I convert an SVG file to JPEG?

Yes, choose JPEG under Output format. JPEG has no transparency, so the Background choice is hidden and every transparent area is filled with the Background color, which starts as white (#FFFFFF). Quality (1–100) starts at 90. A lower number makes a smaller file with more visible compression.

How can I convert SVG code to an image?

Paste the markup into the SVG code box. About half a second after you stop typing, the code is read and rendered like a file. The download is named pasted plus the pixel size, such as pasted-400x300.png. Code that cannot be read shows a message beside the box, and an earlier image stays on screen.

Is SVG a vector or raster format?

SVG is a vector format: it stores shapes, paths and text as instructions, so it can be drawn sharply at any size. PNG, JPEG and WebP are raster formats that store a fixed grid of pixels. Converting fixes that grid once, so set the largest pixel size you will need before you download.

Can I convert several SVG files at once?

No, this page converts one SVG at a time. After a download, select Replace SVG and choose the next file. Output format, quality and background stay as you set them, while the width and height reset to the new SVG's own size. Each download is named after its own SVG file.

Are my files uploaded?

No. The SVG is read, rendered and encoded in a Web Worker in your browser, and its contents and name are not sent to a server or kept in browser storage. The page fetches only the renderer and its DejaVu Sans font from this site, when you add your first SVG.

  • SVG Viewer: check an SVG's size, viewBox and code before you convert it.
  • SVG Optimizer: make the SVG markup smaller when you keep the vector file as well.
  • Image converter: turn the PNG, JPEG or WebP you made into AVIF, GIF or BMP.
  • Compress image: compare smaller versions of the converted image before you download one.