Skip to content

SVG and SVGZ: document preservation and rendering tests

Original source files, independent gzip readers and a native resvg renderer. CloudConvert quality for these operations remains unverified.

Choose between a document and a picture

SVGZ is gzip-compressed SVG. SVGZ to SVG removes compression and preserves every original document byte. SVG to SVGZ compresses the original bytes. Neither operation substitutes a bitmap, rewrites the XML or changes paths, text, comments, encoding or metadata. Linked resources and active content remain in that document; the converter does not load them, execute scripts or generate a preview. This transfer does not sanitize SVG.

PNG, JPG, WebP and other image exports render a static drawing to 8-bit browser pixels. PDF export embeds those pixels on a page; it does not preserve editable vectors or selectable SVG text. Local font availability, browser rendering and antialiasing can affect appearance. Convert text to outlines when its appearance must travel with the drawing.

Original size now means original size

Independent tests of the earlier live release found that Original size silently enlarged a 320×180 SVG to 1024×576 and a 192×96 physical-unit drawing to 1024×512 in both Chromium and WebKit. The corrected renderer uses absolute width and height, with physical units at 96 DPI, or the viewBox when dimensions are missing. An explicitly chosen longest side can still enlarge vector artwork. Inline root sizing is recognized; outer viewport stylesheet rules are overridden by the chosen size.

The retained production measurements and independent output report distinguish this sizing fix from competitive quality. Download the original SVG, independently compressed SVGZ, earlier PNG and corrected original-size PNG.

Independent readers and size curves

Original CC0 fixtures cover gradients, clipping, curves, partial transparency, physical units, viewBox sizing, namespace prefixes, UTF-16 and an embedded PNG. Python gzip validates compressed outputs and exact original document bytes. Native Rust resvg supplies an independent geometric reference. Pillow, OpenJPEG, psd-tools, pypdf and Poppler read the actual browser downloads. Lossless image encoders are checked against the browser raster separately from renderer differences.

The rendering-size measurements record source, settings, output sizes, hashes and full-array visible pixel error against same-size native references at original size, 512 and 1024 pixels. This is a resolution and file-size tradeoff, rather than a lossy encoder quality sweep. The native original-size reference uses a different renderer and is not a CloudConvert output. See the source hashes and reproduction notes.

Retained failures and concrete limits

A later synthetic event-handler fixture exposed another validation defect: Chromium tried to prepare inline SVG and embedded XHTML handlers in a detached XML document. The strict engine CSP blocked them; no handler executed or file request occurred. Container transfers now validate XML as data without creating that browser document, and raster exports reject handlers before browser parsing. Exact source bytes still survive SVG↔SVGZ. Literal handler text inside comments and CDATA remains ordinary data. See the recorded production failure, corrected browser checks and independent output validation. These checks establish this specific correction, without a competitive quality claim.

A candidate with a 100-million-unit drawing produced a correctly sized but clipped picture in both browsers. Output dimensions alone did not catch it; a complete independent pixel comparison did. Raster export now rejects source dimensions or absolute viewBox coordinates above 32,768 units. A smaller 10,000×5,000 drawing is tested at a reduced 1024×512 output with every pixel checked. SVG↔SVGZ can still preserve the original large-coordinate document.

PDF exports retain every embedded RGBA sample exactly, verified with pypdf, and use the expected page dimensions. Poppler page rendering nevertheless misses the initial 30 dB geometric-reference target because of image-edge sampling. That measured limitation remains in the report; it is not labeled a PDF rendering-quality pass. Download the PDF and initial failed measurements. A UTF-16 signature misclassification was also corrected before deployment.

Compressed and expanded inputs and compressed outputs must each fit within 8 MB. SVGZ accepts one complete gzip member with valid CRC and size, without trailing data. UTF-8 and UTF-16 XML, at most 50,000 nodes and 128 nesting levels, are supported. Entity definitions and internal DTD subsets are unsupported. Raster output is limited to 32 megapixels desktop or 12 megapixels iPhone/iPad and 32,768 pixels per side. Raster export requires a self-contained static drawing: scripts, animation, event handlers, foreignObject and external images, fonts or styles are rejected. Supported embedded raster images and fragment references stay local.

Competitive status

No same-input CloudConvert SVG or SVGZ output was available under the recorded daily quota. No additional provider upload was attempted for these tests. Native reader checks, new format pairs and a sizing correction establish specific behavior; they do not establish CloudConvert parity or superiority. The broader coverage and quality goal remains incomplete.

Try the SVGZ converter, SVG to SVGZ, SVGZ to SVG or SVGZ to PNG. Conversion is free and runs on your device inside the isolated engine.