DoneInTab

SVG to PNG Converter

Convert scalable vector graphics (SVG) into high-resolution PNG images. Features strict active-content sanitization, custom dimensions, transparency preservation, and retina scale multipliers (1x, 2x, 4x)—100% private in-browser.

Dimensions (px):
×
Scale Preset:
Export: 500 × 500 px
Background:
transparent
0 characters
Safe Isolated PreviewSandboxed Blob URL (Zero DOM injection)
Upload an SVG file or paste markup to view preview.

Vector Rasterization & Security Architecture

Security-Hardened SVG Pipeline

Many naive converters inject raw SVG into the document object model (innerHTML), exposing users to Cross-Site Scripting (XSS).

Our pipeline validates input using XML DOMParser, scrubs all active content (<script>, <foreignObject>, event handlers), strips external URLs to protect privacy, and renders through an isolated Blob URL image element.

Pixel Density & High-DPI Output

Vectors are mathematically infinite in resolution. When exporting to raster PNG, choosing the correct pixel dimensions is essential for sharp visuals on modern displays.

Use our 2x or 4x presets to automatically generate crisp assets for mobile apps, slide decks, social media avatars, and print media without manual coordinate recalculation.

Frequently Asked Questions

Why does SVG require strict security sanitization before rasterization?

Unlike raster image formats (JPEG, PNG), SVG is an XML-based markup language that natively supports JavaScript execution (<script>), DOM manipulation (<foreignObject>), inline event handlers (onload, onclick), and external network requests (<image>, @import, CSS url). Our engine strips all active and external content to guarantee that rendering cannot execute malicious code or leak your IP address.

Does the conversion preserve transparency?

Yes. By default, the canvas rasterizer preserves alpha channel transparency exactly as defined in your SVG file. You can also select a solid background color (e.g. white, black, or custom hex) if you require an opaque graphic.

What does the scale multiplier (1x, 2x, 4x) do?

Scale presets multiply the target canvas dimensions while retaining vector crispness. For example, a 500×500 vector scaled at 2x exports a crisp 1000×1000 PNG suitable for high-density Retina and 4K displays without blurring or pixelation.

Are my vector graphics uploaded to a remote server?

No. The entire sanitization and rasterization workflow occurs locally within your web browser using HTML5 Canvas and Blob APIs. Your files never leave your computer or device.

What are the maximum dimension limits for export?

To protect browser memory and prevent mobile tab crashes, individual output dimensions are bounded to 8,192 pixels, and total canvas allocation is capped at 67 megapixels. This safely supports ultra-high-resolution print and display requirements.

Related Image & Document Utilities