SVG to PNG Converter

Render a static SVG to PNG with pixel-size, DPI and background options. Process locally without external SVG resources.

Choose export dimensions

Paste SVG markup or choose a UTF-8 SVG file. Explicit width/height values are output pixels; enter one dimension to keep the intrinsic ratio. With both blank, intrinsic CSS pixel dimensions are scaled by DPI/96. Physical units such as mm and pt are resolved at 96 CSS pixels per inch before scaling.

The converter uses width/height, then viewBox, then the browser’s 300 × 150 fallback when intrinsic dimensions are absent. Output is limited to 10,000 pixels per side and 40 million pixels. Text uses fonts available in your browser; no remote font is fetched from the input.

Static SVG and resource limits

PNG export rasterizes static SVG. Local gradients, masks and filters can appear in the result, along with bounded embedded PNG/JPEG images. Document scripts, event handlers and stylesheet instructions are removed. DTDs, entities, SMIL, foreignObject and external references are rejected.

The source can contain up to 200,000 characters, 20,000 nodes and 64 levels of nesting. Embedded image pixels are capped at 20 million, uploaded SVG at 200,000 bytes and worker processing at 10 seconds. The output has a separate pixel limit described above.

Questions & answers

Can it use an embedded PNG or JPEG?

Yes, for bounded Base64 data images. Linked image URLs, nested SVG data images and external filters/stylesheets are rejected.

Are files uploaded to a server?

No. Files, input text and results stay in your browser. Required engines, fonts and support files load from this site.

Other Languages

SVG to PNG Converter — Base64.sh

SVG to PNG Converter

Render a static SVG to PNG with pixel-size, DPI and background options. Process locally without external SVG resources.

Share:

References

How we make sure

We check this tool with the automated test suites linked below. Example checks are shown in their original language.

Verification method
Check physical units, viewBox, single-axis resizing, pixel budgets and SVG resource sanitization.
Comparison reference
Explicit geometry and security-boundary fixtures.
Verification scope
Primary evidence concerns sizing/input handling, not cross-browser PNG pixel comparison.
Test source and cases (select a file to read it)
  • document-tools.test.js
    • SVG to PNG sizing handles physical units, viewBox, one-axis overrides and pixel budgets
    • SVG sanitizer strips scripts/events/stylesheet PIs and rejects remote, escaped and dynamic resources
    • SVG sanitizer accepts bounded real embedded raster data without remote fetching

These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.