FileCompressor

Compression Benchmarks

Reproducible client-side compression benchmarks measured in real Chrome—comparing MozJPEG, ImageQuant + OxiPNG, libwebp, and pdf-lib against native browser Canvas, with a live runner and downloadable test corpus.

  • No install
  • No upload — runs locally in your browser
  • No sign-up

Reproduce the benchmark in your own browser

Generates the exact 3-file deterministic test corpus in local RAM (1600×1066 photo JPEG, 1600×1066 alpha UI PNG, 4-page multi-image PDF), runs 11 compression passes locally via WebAssembly vs. native browser Canvas, and lets you download the corpus (.zip) to verify on third-party tools.

Showing verified reference measurements (macOS Apple Silicon · Chrome). Click "Run live benchmark" to execute all 11 passes on your own CPU · 0 bytes uploaded.

Test file Engine & settings Before → After Reduction Fidelity / Text Time
Photo JPEG (1600×1066)Native Canvas JPEG (Q76 baseline)635.8 KB → 132.9 KB−79.1%36.5 dB11 ms
Photo JPEG (1600×1066)FileCompressor · MozJPEG WASM (Q76)635.8 KB → 69.7 KB−89.0%35.9 dB195 ms
Photo JPEG (1600×1066)FileCompressor · libwebp WASM (Q76 Sharp YUV)635.8 KB → 52.1 KB−91.8%35.8 dB1783 ms
UI Screenshot PNG (1600×1066)Native Canvas PNG (baseline)158.2 KB → 158.2 KB0.0%Lossless9 ms
UI Screenshot PNG (1600×1066)FileCompressor · ImageQuant + OxiPNG (Q76)158.2 KB → 41.5 KB−73.8%61.9 dB2010 ms
UI Screenshot PNG (1600×1066)FileCompressor · OxiPNG Lossless (Q100)158.2 KB → 86.5 KB−45.3%Lossless2838 ms
UI Screenshot PNG (1600×1066)FileCompressor · libwebp WASM (Q76)158.2 KB → 41.1 KB−74.0%43.1 dB807 ms
4-Page Report PDFFileCompressor · PDF Lossless Structure1.16 MB → 1.15 MB−1.3%Text kept21 ms
4-Page Report PDFFileCompressor · PDF Balanced (150 DPI, text kept)1.16 MB → 172.7 KB−85.5%Text kept463 ms
4-Page Report PDFFileCompressor · PDF Strong (105 DPI, text kept)1.16 MB → 103.2 KB−91.3%Text kept318 ms
4-Page Report PDFFileCompressor · PDF Target Size (≤ 250 KB, text kept)1.16 MB → 231.9 KB−80.5%Text kept1810 ms

Reference corpus ID: fc-bench-v1 · Seeded deterministic generator (0 copyrighted files). Re-running above replaces these rows with live measurements from your own browser and CPU.

Architecture & privacy comparison: FileCompressor vs. alternatives

Verifiable architectural comparison across popular compression tools (no fabricated third-party ratios—download the corpus above to test ratios yourself).

Tool File upload required? PDF Target Size & Batch Account / install & trade-offs
FileCompressor.dev No (100% local WASM Worker) Yes (PDF Target Size + up to 40 files + ZIP) Free, no sign-up, no install · Video omitted; mobile RAM capped around 40 MB PDFs
TinyPNG (web) Yes (uploads to remote servers) Images only (free web tier capped at 20 files / 5 MB) No install · Paid plan required for larger files & higher batch limits
Squoosh (web) No (100% local WASM) Single image only (no batch, no PDF) Free, open-source · Best for deep single-image codec experimentation
PDF24 (web / desktop) Web uploads to servers (desktop app is local) PDF presets & multi-tool suite Free · Local zero-upload mode requires installing the Windows desktop app

Methodology and test corpus (fc-bench-v1)

Most online compression sites advertise headline claims like "reduce files by up to 90%" without publishing test files, quality metrics, or reproducible scripts. We built this page so any engineer, reviewer, or visitor can verify our codecs directly on their own hardware:

  1. Deterministic open test corpus: Clicking Run live benchmark or Download test corpus (.zip) generates the exact same 3 files from fixed PRNG seeds (mulberry32) with zero copyrighted assets:
    • bench-photo-1600x1066.jpg (635.8 KB): High-frequency photographic gradient, mountain ridge edges, bokeh specular highlights, and fine film grain saved at Q96 JPEG.
    • bench-ui-1600x1066.png (158.2 KB): Crisp SaaS analytics dashboard screenshot with high-contrast Inter text, data cards, sparkline chart, and true semi-transparent alpha corners.
    • bench-report-4pages.pdf (1.16 MB): 4-page PDF containing selectable Helvetica vector text on every page, two embedded high-resolution JPEG photos, one uncompressed lossless PNG slide, and a duplicated company logo object repeated on all 4 pages.
  2. Objective quality measurement: For image codecs, the worker measures sampled PSNR (Peak Signal-to-Noise Ratio in dB) between decoded input RGBA pixels and decoded compressed output pixels. Higher dB means closer pixel fidelity (typically 38–42+ dB is visually indistinguishable at normal viewing distance; 99.9 dB / Lossless means 0 pixel difference).
  3. Why we do not fabricate third-party compression percentages: Cloud tools such as TinyPNG and PDF24 run proprietary server pipelines that change over time and require uploading your files over the network. Rather than publishing unverified or stale competitor ratios, we provide the exact Download test corpus (.zip) button above so you can upload the same 3 files to any third-party tool and compare bytes, visual clarity, and upload time side by side.

Key takeaways from our reference Chrome run

  • MozJPEG WASM vs. Native Canvas JPEG (Q76): On bench-photo-1600x1066.jpg (635.8 KB), native browser canvas.toBlob('image/jpeg', 0.76) outputs 132.9 KB, while FileCompressor's MozJPEG WASM (multi-pass trellis quantization + HVS table 3 + progressive scan) outputs 69.7 KB—47.6% smaller than native Canvas at matching quality setting (35.9 dB vs. 36.5 dB PSNR) in 195 ms.
  • ImageQuant + OxiPNG vs. Native Canvas PNG: Native canvas.toBlob('image/png') saves 0.0% (158.2 KB → 158.2 KB). FileCompressor's perceptual palette mode (ImageQuant + OxiPNG Q76) cuts it to 41.5 KB (−73.8%) at a remarkable 61.9 dB PSNR, while OxiPNG Lossless (Q100) cuts −45.3% (86.5 KB) with zero pixel modification.
  • PDF Presets & Target Size (1.16 MB 4-page report): Balanced drops the PDF to 172.7 KB (−85.5%) in 463 ms, Strong hits 103.2 KB (−91.3%) in 318 ms, and PDF Target Size (≤ 250 KB) binary-searches to 231.9 KB (MozJPEG Q78)—all while merging 3 duplicated logos and keeping 100% of the vector text selectable.

Architecture comparison: FileCompressor vs. TinyPNG, Squoosh, and PDF24

The table above compares verifiable architectural properties across well-known tools:

  • TinyPNG: Excellent perceptual PNG/JPEG/WebP compression, but requires uploading images to remote servers and limits free web batches (typically 20 files / 5 MB per image on free tier) and does not offer client-side PDF target-size search.
  • Squoosh: Pioneering open-source client-side WASM image compressor (using the same open-source MozJPEG/libwebp/OxiPNG ecosystem), ideal for single-image tuning—but intentionally does not support batch compression, ZIP export, or PDF compression.
  • PDF24 Tools: Feature-rich PDF suite offering both a cloud web service (uploads files to servers) and a Windows desktop installer; does not run zero-upload WASM PDF compression across macOS/Linux/Chromebooks purely in the browser without installing software.
  • FileCompressor.dev: Combines compiled WASM image codecs (MozJPEG, ImageQuant + OxiPNG, libwebp, AVIF) with surgical client-side PDF XObject recompression and binary-search PDF Target Size—all in one zero-upload browser workbench supporting batches up to 40 files.

Benchmark caveats and measurement boundaries

How to read these benchmark numbers fairly and what variables affect real-world files.

Synthetic corpus vs. real-world variance

Synthetic deterministic test files make results 100% reproducible across machines and avoid copyright issues, but real-world compression ratios always depend on your source file's existing entropy, camera noise, and whether it was already compressed.

Cold vs. warm WASM timings

First-run WebAssembly execution includes a one-time CDN fetch and WASM compilation (~150–400 ms); subsequent compressions reuse the cached compiled module in RAM.

PSNR vs. human visual inspection

PSNR measures pixel MSE and does not capture every perceptual nuance; always use our split visual inspector on /compress-image when judging subtle skin tones or thin typography.

Desktop vs. mobile CPU speed

Desktop CPUs run WebAssembly 2–4× faster than mid-range mobile phones. Heavy OxiPNG Q100 lossless passes or multi-image PDF binary searches take longer on older mobile hardware.

Benchmark methodology FAQ

Why do timings differ slightly when I re-run the benchmark on my computer?

Because performance varies across CPU architectures (Apple Silicon, Intel/AMD x86, mobile ARM) and browser engines (Chromium, WebKit, Gecko), we publish our reference macOS Chrome numbers alongside a one-click live runner so you can measure exact byte sizes, PSNR, and timings on your own device.

Can I download the exact test files to benchmark TinyPNG, Squoosh, or PDF24 myself?

Yes. Click Download test corpus (.zip) to save the exact bench-photo-1600x1066.jpg, bench-ui-1600x1066.png, and bench-report-4pages.pdf files locally. You can upload them to TinyPNG, Squoosh, PDF24, or any desktop compressor to compare output bytes and visual fidelity directly.

Does running the live benchmark upload any data?

All image and PDF sizes are generated and compressed in local RAM with 0 bytes uploaded. The only network activity is fetching the open-source WASM codecs from jsDelivr CDN on first run (cached by your browser afterward).

How should I interpret PSNR dB scores in the benchmark table?

PSNR (Peak Signal-to-Noise Ratio) measures mathematical closeness between original and compressed pixels in decibels. Above ~38–40 dB is typically indistinguishable at normal screen distance, while 60+ dB (such as our UI PNG ImageQuant pass) is visually near-identical and Lossless means zero pixel difference.