Skip to content

SVG to PNG

Convert SVG to PNG by pasting SVG code or opening an .svg file. The tool cleans the SVG in your browser, then renders it on our render server with Chromium, so you get a PNG at the width and pixel density you choose.

  • Fonts that are not installed on the render server are drawn with a fallback font. Embed the font in the SVG if you need an exact match.
  • The output is PNG only. In the free tool the output height is capped at 2000 px.
  • Anonymous use needs a human check. Results are deleted after 10 minutes, and no history is kept.

You can also drop a file here.

0 B of 256 KB allowed in the free web tool.

Loading...

Complete the human check to enable the button.

Result

Your image will appear here.

The free web tool captures at most 2000px of height. For taller captures, use the API.

Retention: web-tool results are deleted after 10 minutes and no history is kept. API results are kept 1 day on the free plan and 7 days on Starter and Pro (30 days on Business).

  • No account needed

    10 per minute and 50 per day for free.

  • Real browser rendering

    Headless Chromium, the same engine as the API.

  • Deleted automatically

    Web tool results are removed after 10 minutes.

Privacy: what you submit is used only to make this file. The working copy is deleted when the job ends, the result after 10 minutes. See the privacy policy.

Do this from your code

The same request, built from the input and options above. Create an account to get an API key.

curl -X POST https://api.aiipworld.com/v1/render \
  -H "Authorization: Bearer $AIIPWORLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html":"","output":"pdf","options":{}}'

# returns {"job_id": "...", "status": "queued"}; then poll:
curl https://api.aiipworld.com/v1/jobs/JOB_ID -H "Authorization: Bearer $AIIPWORLD_API_KEY"

Batches

The web tool handles 1 document at a time. The API takes one request per document, so you can script as many as your plan allows.

More control

Whole-page capture (full_page), clipping to a region, request headers and a custom user agent are API options. See the docs.

Retention

Web-tool results are kept 10 minutes; free API results 1 day; Starter and Pro results 7 days; Business 30 days. The web tool allows 10 conversions per minute and 50 per day per visitor.

In one sentence

A free online tool that rasterises SVG code or an SVG file into a PNG at the width and pixel density you choose, using Chromium.

Key facts

  • Input: SVG code or an .svg file up to 2 MB; scripts and event attributes are removed in your browser first.
  • Output: PNG, 100 to 4000 px wide at 1x, 2x or 3x, with a transparent, white or coloured background.
  • Height limit in the free tool: 2000 px. Text uses the fonts on the render server unless the SVG embeds its own.
  • Free without an account: up to 10 conversions per minute and 50 per day per visitor, no watermark. Signed in, each render costs 1 credit (100 free credits every month).
  • Files are deleted automatically: 10 minutes after conversion without an account, 1 day with a free account.
  • Developers can run the same render with POST https://api.aiipworld.com/v1/render and an API key (see the screenshot API page).

How it works

  1. Paste your SVG code, or open an .svg file from your computer.
  2. Check the size the tool reads from your SVG.
  3. Set the output width in pixels. Leave it blank to use the SVG's own width.
  4. Choose a pixel density of 1x, 2x or 3x, and a background: transparent, white or a colour.
  5. Press Convert, check the output size, and download the PNG.

Example output

PNG made from an SVG sample
The default SVG rendered at its own size at 2x, transparent background. Generated by this site's own engine. Open the file (or select the picture) to see it at full size.

How to convert SVG to PNG

Open the converter and paste your SVG code into the box, or open an .svg file from your computer. The SVG is cleaned in your browser before it is rendered, so scripts and event attributes are removed.

The tool reads the width and height of your SVG, or its viewBox, and shows that size. After you convert, it shows the output size in pixels.

The output is a PNG file that you can download. Anonymous use needs a human check before the conversion runs. Signed-in users skip the check and use credits.

Output size and pixel density

The output width is set in pixels. Leave the field blank to keep the width of your SVG. The height follows the proportions of your SVG, so you do not need to work it out yourself.

Pixel density sets how many pixels are drawn for each unit of the output size. Choose 1x, 2x or 3x. At 2x or 3x, the same output size has more pixels.

The free tool allows an output height of up to 2000 px. If a tall SVG is too tall at the width you chose, lower the width or edit the SVG to make it shorter.

  • Width blank: the SVG's own width is used.
  • Pixel density: 1x, 2x or 3x.
  • Height: follows your SVG, up to 2000 px in the free tool.

Transparent background

The background is transparent by default. Areas of the SVG that have no fill stay transparent in the PNG. Parts that have their own fill keep that fill.

Choose white or a colour when you need a solid background behind the image. Keep the transparent option for logos and icons that you will place on other designs.

Fonts and images inside your SVG

Text in your SVG is drawn with fonts that are installed on the render server. These include Liberation Sans, Liberation Serif, Liberation Mono, Noto Sans, Noto Serif and Noto Sans Display. Noto fonts also cover many other scripts, including Arabic, Hebrew, Devanagari and Thai, and CJK characters.

Arial and Helvetica map to Liberation Sans. Times New Roman maps to Liberation Serif, Courier New maps to Liberation Mono, and Georgia maps to Noto Serif. Fonts that are not installed on the server, such as Segoe UI, Roboto and Inter, are drawn with a fallback font.

Fonts from your own computer are not on the server. To keep a specific font, embed it in the SVG, or load it with @font-face from a public URL or a data URL.

External images load only from public http and https addresses. Images that point to private networks or localhost will not load.

SVG or PNG

A PNG has a fixed number of pixels. The width you set and the pixel density decide that number. If you may need a different size later, keep your original SVG and convert it again at the size you need.

This tool outputs PNG only. For a vector PDF, use the SVG to PDF tool. It keeps shapes and text as vector, and the PDF page size equals the SVG size. For JPG output, use the html-to-image tool, which offers PNG and JPG for HTML that you paste.

What gets removed from the SVG

Before rendering, the tool cleans the SVG with DOMPurify. Scripts, event attributes and similar parts are removed. The rest of the drawing is kept.

Because scripts are removed, an SVG that needs JavaScript to draw its content will not show that content in the PNG.

The PNG is rendered by Chromium, so what you see in the result is what the browser draws. Check the output size and the picture before you download the file.

SVG to PNG from code

You can run the same kind of conversion through the render API. Send a POST request to /v1/render with your SVG inside the html field and output set to png. Send your API key in the header Authorization: Bearer followed by the key, or as x-api-key.

The request returns 202 with a job_id. Poll GET /v1/jobs/:id until the status is succeeded, failed or timeout. On success, download the file from download_url. That link is short-lived, so download the file soon after the job finishes.

Credits for failed and timed-out jobs are returned. Each job uses a fresh browser context, so cookies and cache do not carry over between conversions. The API has no batch endpoint, so send one request for each document. Webhooks are not available yet.

Using this SVG to PNG converter

Use this svg to png converter when you need a raster copy of a vector drawing, for example for a page or an app that does not accept SVG files. Paste the code or open the file, choose the width and pixel density, and the PNG is drawn by Chromium.

Questions

Can I convert an SVG file to PNG?

Yes. Paste SVG code or open an .svg file, set the output options and convert. The result is a PNG file that you can download. Anonymous use needs a human check first.

What is the difference between SVG and PNG?

A PNG has a fixed number of pixels, which the width and pixel density you choose set. Keep your original SVG if you may need other sizes later, because you can convert it again at any size the tool accepts.

How do I keep the background transparent?

Leave the background option on transparent, which is the default. Areas with no fill stay transparent in the PNG. Choose white or a colour only if you need a solid background.

How big will the PNG be?

The width is the output width in pixels, and the height follows the proportions of your SVG. A pixel density of 2x or 3x gives more pixels at the same visible size.

Why does the text look different?

The text uses fonts installed on the render server. Fonts that are not on the server, such as Segoe UI, Roboto or Inter, are drawn with a fallback font. Embed the font in the SVG if you need the exact look.

Does it run scripts in my SVG?

No. The tool removes scripts and event attributes from the SVG before it renders the image. The drawing that remains is rendered as the browser draws it.

Can I convert SVG to JPG?

This SVG tool outputs PNG only. The html-to-image tool offers PNG and JPG for HTML that you paste, so use it if you need a JPG.

What is the maximum size?

In the free tool the output width can be 100 to 4000 px and the output height 100 to 2000 px. SVG files over 2 MB are not opened.

How long is the PNG kept?

Results from the free tool are deleted after 10 minutes. No history is kept, so download the PNG before that time.

Do I need an account?

No. You can convert anonymously after the human check. Signed-in users skip the check and use credits. We add no watermark to the output.

Does the PNG match what my browser shows?

The PNG is rendered by Chromium, so it shows what the browser draws for the same SVG. The only change the tool makes is removing the scripts and event attributes it cleans out.

Can I convert SVG to PNG in code?

Yes, through the render API. Send a render request with your SVG inside the HTML input and output set to png, then poll the job until it succeeds. Credits for failed jobs are returned.

Need this in your app or in bulk?

This tool runs on the render API, so the same image is one HTTP request from your code. A free account includes 100 credits a month.

Related tools