local · no upload · honest receipts

Put your files
on a diet.

The honest way to shrink a file. Shrink PDFs, images, and whole folders under a size limit — on your machine, safe by default, with an honest before/after receipt. One command, or an engine you embed.

npx onadiet report.pdf --to 5mb
Try it live ↓
🔒 Zero uploads — no network calls Never overwrites your original 📏 Measured, never estimated
onadiet mascot roadshow-deck.pdf balanced
before
9.0 MB after
4.8 MB
−47% 4.2 MB lighter · held above the quality floor
plan balanced · re-encoded embedded images
quality above the balanced floor (SSIM ≥ 0.90)
safety ✓ no signature · no form fields
wrote roadshow-deck.diet.pdf · original untouched
Try it — live

Slim a photo yourself — on your device, nothing uploaded.

Drop in an image and pick a plan. It re-encodes right here in your browser, held to a measured SSIM floor — and the gauge proves your file never leaves this tab. No server, no account, nothing sent.

1 · Your photo
Drop an image here
JPEG / PNG / WebP · stays on your device
2 · Diet plan
3 · The weigh-in
Drop a photo to see the before → after.
On your device
0
fetch / XHR calls
0 B
bytes sent

Every fetch and XHR on this page is instrumented live — while onadiet slims your photo, both stay at zero. The work happens in your browser; the file never leaves this tab.

This is just a taste. A browser can only shrink efficiently by re-encoding to WebP, so that's what runs here — held to onadiet's real SSIM floor (both images decoded, luma 8×8), measured live, never estimated. The real deal is the library: it encodes with best-in-class codecs — mozjpeg, WebP, and AVIF (which browsers can't encode) — and it can keep your original format (a PNG stays a PNG, a JPEG a JPEG) or switch to a smaller one when that wins, plus it does PDFs and whole folders. Download the open-source library → Same promise everywhere: nothing is uploaded.

Measured, not promised

Real files. Real savings. Every number measured on the output.

Proven against a genuinely public 9 MB SpaceX IPO-roadshow deck (60 pages, 224 images) in the golden-corpus test suite. Ask for a plan, or a target size — if it can't hit the target above the quality floor, it refuses honestly instead of returning garbage.

Plan Quality floor 9.0 MB → Reduction
cleanse lossless 9.0 MB
0%
lowcarb SSIM 0.96 8.1 MB
~10%
balanced SSIM 0.90 4.8 MB
~47%
keto SSIM 0.80 3.7 MB
~59%
crash floorless 3.3 MB
~64%

Images too: a real photo (JPEG) → ~55% smaller at SSIM 0.94; a flat graphic (PNG) → 8 KB, ~99% smaller via an automatic switch to AVIF. Every figure is reproducible with pnpm run test:perf — no estimates.

See how onadiet compares to TinyPNG & others →

The diet plans

Pick how hard to cut — from a lossless cleanse to a crash diet.

Quality is a contract, not a guess. Every plan holds a measured perceptual floor (SSIM), so lowcarb stays visually lossless and only crash accepts visible loss.

Not just a CLI

An engine for your hot path.

The same engine behind diet is an importable library (@onadiet/core + adapters). It holds no cross-call state, so a server can slim on every request — with a worker-offload pattern to keep your event loop free.

server.ts
import { imageAdapter } from '@onadiet/image'

// no cross-call state — safe to call per request
const result = await imageAdapter.slim(bytes, {
  plan: 'balanced',
  fast: true,   // ~9× lower latency: one nominal encode
})

result.output          // a smaller file — measured
  ? send(result.output)
  : keep(result.outcome) // honest: kept original / infeasible
~9×
lower per-call latency with --fast
~2.9×
folder throughput across cores
~flat
peak memory as the tree grows — bounded
0
shared state — concurrency-safe by construction

Encode/decode runs on the libuv threadpool; the worker-offload pattern moves a whole slim off the event loop. Cancellation via AbortSignal, fail-fast size caps, honest --json everywhere.

The bigger idea

One verb. Everything smaller.

onadiet starts with files — but it's one honest, measured engine, and the vision is a franchise: put your X on a diet. Files ship today; the rest is the roadmap — same rules, always (local, measured, keeps your original).

shipped

Files

PDF · images · SVG · folders

vision

Tables

vision

Docker images

vision

Repos

vision

Models

vision

Tokens

Why onadiet

No uploads, no guesswork.

The alternatives are a stranger's upload form or a pile of memorized Ghostscript flags. onadiet is neither.

Local, no upload

It's your file; it stays your file. No account, no cloud, no network calls — nothing leaves your machine.

Safe by default

Never overwrites your original, never writes a bigger file, writes atomically — and refuses to silently break a signed or form PDF.

Measured, never faked

It verifies every result, holds a quality floor, and keeps your original if it can't honestly beat it. A saving it didn't measure is a bug.

Getting started

One command. The metaphor is the vocabulary.

diet report.pdf --to 5mb Hit a goal weight — slim under 5 MB, holding the quality floor.
diet ./photos --to-total 25mb Put a whole folder under a budget, structure preserved.
diet weigh brochure.pdf Step on the scale — what does it weigh, what's heavy? No changes.
diet check ./public --max 2mb CI weigh-in — pass/fail a budget with honest exit codes.
diet checkup Is the kitchen stocked? Which codecs/engines are available.

Everything speaks --json for scripts and agents. See the full usage & API reference — every command, flag, and the four ways to run onadiet.

Weigh in.

On npm now — built and proven against real files. One line to install:

npm i -g onadiet