Compress an image to an exact KB
Upload limits ask for 100KB, 50KB or 20KB — not “smaller”. Set the exact size, get a file that actually fits, without wrecking the picture.
Next step: crop a photo to passport or visa spec — exact pixels, 300 DPI tag, file-size cap.
How it works
Questions
Is my photo uploaded to a server?
No. Compression runs inside your browser using the canvas API. The file never leaves your device, so there is nothing to delete afterwards and nothing to leak.
What if it cannot reach the target exactly?
Some files cannot go below a certain size without becoming unusable — a very detailed photo at 20KB, for example. When that happens we return the closest achievable result and tell you the gap instead of silently failing.
Which format should I choose?
JPG is the safe default for photos and almost every upload form accepts it. WebP is roughly 25% smaller at the same quality but not every portal accepts it. PNG keeps text and flat graphics sharp but cannot be pushed as small.
Does it keep my photo metadata?
No. Converting through the canvas strips EXIF, including GPS coordinates. That is usually what you want for a form upload — say so if you need it preserved.