Shrink a photo or image to 20KB or less for upload limits on forms, shops and communities.
"20 KB" here means at most 20 × 1,024 = 20,480 bytes. Nerulio encodes JPG and WebP candidates, searches each one's quality down until it fits, decodes every candidate and keeps the one closest to the original: on the 512 × 512 NASA photo that was a WebP at quality 0.52, 20,206 bytes, SSIM 0.959. Resolution is kept unless you allow shrinking, and a full-size phone photo cannot get under 20 KB without it. If the form counts 20 KB as 20,000 bytes, type 19 in Target size.
Drop image files hereProcess many files at onceNo upload · processed on this device
Making a game?
Nerulio is a 2D game asset studio first: draw pixel art, cut sprite sheets into animations, pack texture atlases, check autotile tilesets and export them for Godot, Unity, Phaser and other engines. It runs in your browser; files stay on your device.
With a target, each lossy format is first encoded at the level's quality (Balanced: 0.80). If that is too big, the quality is searched in 8 halving steps between 0.05 and 0.80 and the largest quality that fits is kept. PNG is never quality-searched. Of all candidates at or under 20,480 bytes, the one with the highest SSIM wins — not the smallest.
20,480 bytes are 163,840 bits. Spread over the 512 × 512 fixture that is 0.63 bits per pixel, which scored SSIM 0.96 as WebP. A 4032 × 3024 phone photo would get 0.013 bits per pixel: no quality setting can reach that. The tool then returns its smallest attempt with "Target size not reached. Try allowing smaller dimensions."
With "Reduce dimensions if the target cannot be met" ticked, up to five smaller widths are tried, each 55–85 % of the previous one. Smaller versions are scored after being scaled back up, so they only win when they genuinely look closer to the original: on the fixture the 435-px WebP scored 0.9581 and the full-size one 0.9593, so the full size stayed.
KB
1,024 bytes in Nerulio's target and display; some forms use 1,000.
Quality search
Halving steps between 0.05 and the level quality until the file fits.
Reduce dimensions
Opt-in: lets the tool try smaller widths when the target cannot be met.
The NASA photo squeezed into 20 KB (measured)
Balanced level, Auto format, Chromium 153, 2026-09-28. Bits per pixel are arithmetic from the target.
Target 20 KB = 20 x 1,024 = 20,480 bytes
astronaut.png 512 x 512 791,555 bytes
WebP q0.516 20,206 bytes SSIM 0.9593 <- chosen
JPG q0.293 20,117 bytes SSIM 0.9463
PNG 575,694 bytes over the target
Shrink on: best smaller try 435 x 435 WebP, SSIM 0.9581 (not chosen)
Budget 163,840 bits / 262,144 px = 0.63 bits per pixel
163,840 bits / 12,192,768 px = 0.013 bits per pixel (4032 x 3024)
At the density that scored about 0.96 here, 20 KB holds roughly 0.27 megapixels — about 595 × 446 for a 4:3 photo. Resize a phone photo to that first with resize, or allow shrinking. Note that 20,206 bytes is over 20,000.
What to type for the limit your form means
The form says
Target size to enter
Largest file you get
20 KB, counted as 1,024 bytes
20 (preset)
20,480 bytes
20 KB, counted as 1,000 bytes
19
19,456 bytes
20 KB and the file must be JPG
20, Output format JPG
JPG q0.293, 20,117 bytes on the fixture (SSIM 0.9463)
Under 20 KB, exact pixel size given (e.g. an ID photo)
20, after resizing to that size
Fewer pixels, higher quality
Check the result
Check the exact byte count in your file manager before uploading: the result list rounds 20,206 bytes to "20 KB".
Open the file at 100 %: faces, eyes and small print are where 20 KB shows first.
Check the extension: Auto may give .webp; many forms want .jpg.
Troubleshooting
Symptom
Likely cause
How to check
Fix
"Target size not reached"
Too many pixels for 20,480 bytes even at quality 0.05
The warning under the file
Tick "Reduce dimensions if the target cannot be met", or resize to about 600 px wide first
The form says the 20 KB file is too large
The form counts 1 KB as 1,000 bytes
File properties show e.g. 20,206 bytes
Enter 19 as Target size (at most 19,456 bytes)
The result is .webp but the form wants .jpg
Auto chose WebP because it scored higher
The name ends in -min.webp
Advanced → Output format → JPG
The face is blocky or the text unreadable
20 KB forces a very low quality at this pixel count
Zoom in at 100 %
Crop to what matters with crop or shrink the dimensions, then compress again
The form shows a known pixel size (for example a small ID photo), so larger pixels are wasted bytes.
What this page does not cover
Scores come from copies at most 512 px long, so they can miss damage to fine print on large scans.
The same target can give slightly different byte counts in another browser, because the encoders are the browser's.
Versions and sources
Measured on 2026-09-28 in Playwright Chromium 153 by calling src/compression.js with the options src/task/compress.js passes for ?kb=20 (quality 0.80, Auto, background #ffffff), with and without shrinking, on tests/fixtures/astronaut.png and Pillow JPGs of it.
Several quality and format candidates are encoded until one fits 20KB; each result is decoded again and compared (SSIM) so the best-looking one wins. You see the real file size before downloading.
Resolution is kept by default. Only if the target cannot be reached, opt in to shrinking the dimensions.
Your file is never uploaded — it is processed inside this browser.
Example generated with this tool. ZIP tools show their preview; inspect the downloaded archive for every file.
Compress image
Set a size limit, then check the actual result.
How it works
Open the source file
Choose the processing mode and settings
Run, inspect the result and download
Supported formats
PNG / JPG / WebP / AVIF / HEIC → PNG / JPG / WebP — Input decoding and output encoding depend on browser support. Animated inputs are rejected; select a still frame first.
What this tool does
Auto compares actual browser codec outputs using a sampled visual metric and target-size search. Alpha-aware format selection; optional dimension reduction.
Implementation and verified quality
advanced · browser codecs / proxy SSIM candidate search. Quality qualification is in progress. Pro/Flagship quality has not been established.
Before you export
Actual device memory, storage and codec support. Tested examples are evidence, not a guarantee for every file.
Frequently asked questions
What determines the supported size?
Actual device memory, storage and codec support. Tested examples are evidence, not a guarantee for every file.
Are my files uploaded?
This tool processes the files you open on your device without uploading them. Images you explicitly attach to community posts are uploaded separately. Optional engines and models are downloaded from third parties; those requests expose connection information such as your IP address.
Will my work be saved automatically?
No. Images and editing state stay in this tab; media output can use local temporary storage. Changing language preserves your work; reloading, closing the tab, or following a link to another page can clear it.