Skip to main content

Convert SVG

Convert an SVG file locally to PNG, JPEG, or WebP with control over size, background, and quality.

  • Export

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

Image
No image loaded

Drop an image here

Add an SVG file. It is rendered locally, then you choose its output size and format.

Need more editing options?

Use multiple editing tools in one workspace, with your open file and its current edits.

Open the full editor

Was this tool useful?

On this page

How does this tool work?

An SVG is vector-based: it stays sharp at any size, but many apps, social networks and document editors only accept raster images. This converter draws your SVG as PNG, JPEG, WebP, AVIF, BMP or GIF, at the size you choose, right in your browser. A 24 px icon can thus become a sharp 512 px PNG.

Import an .svg file. The browser draws it at its declared size: width and height of the svg tag, converted to pixels at 96 dpi for mm, cm, in, pt or pc units. Without a usable size (or with percentages), the viewBox is used; if only one side is given, the other follows the viewBox proportions, and with no information at all the rendering is 512 × 512 px.

In the resize tab, enter the width or height you want. As long as you have made no other edit, the SVG is drawn again at that size instead of enlarging the first rendering: the result stays perfectly sharp. The studio's other tools (crop, rotate and so on) remain available, with Undo and Redo.

In the Export tab, choose the format. PNG and WebP keep transparency, GIF as on-or-off; JPEG, BMP and AVIF replace it with white. Quality applies to JPEG, WebP and AVIF. AVIF, BMP and GIF go through an FFmpeg WebAssembly module loaded on demand. The file is named name-edited.extension.

How to use this tool

  1. Import the SVG

    Add your .svg file; the preview appears at its original size.

  2. Choose the size

    Resize before any other edit for a sharp vector rendering.

  3. Export

    Choose PNG, JPEG, WebP or another format, then download.

From SVG units to pixels

In CSS, as in SVG, one inch equals 96 pixels. Absolute lengths are converted on that basis to set the rendering size.

Millimetres to pixels

p = L ÷ 25.4 × 96

210 mm gives 793.7 px, rounded to 794 px. Likewise 1 pt = 96 ÷ 72 px and 1 cm = 96 ÷ 2.54 px.

p
size in pixels
L_mm
declared length in millimetres

Use cases

Logo for a social network

Get a square 400 or 1,000 px PNG from your brand's vector logo.

Image for a document

Insert an SVG illustration into Word, PowerPoint or an email that cannot read the format.

App icon

Render an SVG icon as sharp PNGs at several sizes for a store or a manifest.

Examples

24 px icon enlarged

A percentage has no intrinsic size: the viewBox gives 24 × 24. Resizing redraws the vector, with no enlargement blur.

Input

icon.svg with viewBox="0 0 24 24" and width="100%"

Result

Initial rendering 24 × 24 px, resized to 512 → icon-edited.png at 512 × 512 px, sharp

A4 page drawn in millimetres

210 ÷ 25.4 × 96 = 793.7 px, rounded to 794. For printing at 300 dpi, resize to 2,480 px wide.

Input

plan.svg with width="210mm" height="297mm"

Result

794 × 1,123 px at 96 dpi

Tips and best practices

  • Resize first: after another edit, enlarging applies to the raster image and becomes blurry.
  • Keep PNG or WebP if the logo must stay transparent on a coloured background.
  • An SVG that loads external fonts or images may render differently: outline the text or embed the images before converting.
  • For a complete multi-size favicon, the favicon generator also produces the ICO file.

Sources and references

Frequently asked questions

Why is my export blurry?

You probably enlarged after another edit. Undo back to the start, resize first, then make the other adjustments.

Which size is used without width or height?

The viewBox size, in pixels. Without a viewBox either, the image is rendered at 512 × 512 px.

Is transparency kept?

Yes in PNG and WebP, and as on-or-off in GIF. In JPEG, BMP and AVIF the background becomes white.

Are the SVG's fonts respected?

Only if they are installed on your device or converted to paths. An external web font is not loaded by the rendering.

Can I convert several SVGs at once?

No, the tool handles one file at a time.

Is my file uploaded to a server?

No. Rendering and encoding happen in your browser; only the FFmpeg module is downloaded for AVIF, BMP and GIF.

Related tools

Tools similar or complementary to this one.

Similar tools

Reduce SVG markup locally while keeping the graphic editable.

Images & graphicsUse this tool

Create a favicon.ico and a site’s PNG icons (16 to 512 px) from one image, in your browser.

Images & graphicsUse this tool

Resize an image by setting its exact width and height before downloading the result.

Images & graphicsFeaturedUse this tool