Image

How to compress an image to 10KB, and when you need to shrink it first

10 KB is one of the tightest limits forms use. In our tests a signature and a smooth photo fitted, while three images stopped at the 640 pixel floor. Shrinking them to 300 x 400 pixels first solved two of them.

Updated ยท 11 min read

Featured image: How to compress an image to 10KB, and when you need to shrink it first, with a real screenshot of the Compress Image tool tool on Dokurapi
Inside the frame: a real screenshot of the Dokurapi tool. All processing runs in the browser, nothing is uploaded.

To compress an image to 10KB, open Dokurapi's free Compress Image tool, choose the image, type 10 in the Custom target (KB) box, leave Pixel size on Shrink if needed, press Compress photo, and read the status line before you download. The tool aims 6% under your number, so a 10 KB target means a JPG of at most 9,400 bytes. A signature scan in our test came out at 8,031 bytes and a phone photo at 8,881 bytes. Photos of printed text and small portraits did not fit at first: the tool stops shrinking at 640 pixels on the long side. Resizing those to about 300 x 400 pixels before compressing brought them under the line.

Limits of 10 KB usually appear for signatures, thumbnails and small ID photos on older registration systems. At this size there is no room for detail: a full size phone photo is about 500 times bigger, so the tool must cut both quality and pixels hard. The good news is that the tool tells you honestly when it cannot reach the target, instead of handing you a file that a portal will reject. This guide covers the steps, real results from five test images, the 640 pixel floor that stops some images, the pre-shrinking workaround, and how to judge whether the result is still usable. If your form allows more, our guides to 20 KB, 30 KB and 50 KB give noticeably better quality.

Steps to compress an image to 10KB

You need no account and no app. The tool writes a new JPG and leaves the original untouched.

  1. Crop first. Every pixel you remove before compressing leaves more bytes for the part that matters. Crop signatures close to the ink and portraits to the head and shoulders. Our crop photo guide shows how on a phone or computer.
  2. Open the Compress Image tool and choose one image. It accepts JPG, PNG and WebP.
  3. Type 10 in the Custom target (KB) box. The preset menu starts at 100 KB, so 10 always needs the custom box.
  4. Keep Pixel size on Shrink if needed. At 10 KB almost every image needs fewer pixels.
  5. Press Compress photo and read the status line. Safe target reached means the file is under 9,400 bytes. The image was reduced, but the target was not reached means it is still too big; see the workaround below.
  6. Open the file and zoom in. Check that the signature, the face or the heading can still be recognised.
Dokurapi Compress Image tool with 10 typed as the custom target, showing a 278 KB signature scan reduced to 8.0 KB at quality 45% and 751 x 282 px with the message Safe target reached
A successful 10 KB result: our 278 KB signature scan came out at 8.0 KB, quality 45%, 751 x 282 pixels. Mostly white paper with a few strokes is the easiest content to squeeze.

Ready to try it? The tool is free and runs in your browser.

Open the Compress Image tool

How the tool tries to reach 10KB

The tool works in two stages. First it draws the image on a canvas with the longest side capped at 2,400 pixels and saves a JPG at the starting quality of 84%. If the file is above the safe line it lowers quality by 10 points, up to seven more times, never below 18%. The quality value goes straight to the browser's JPEG encoder, as described in MDN's toBlob reference.

At 10 KB the first stage never succeeds for a normal photo, so the second stage takes over. The tool shrinks the width and height step by step, tries quality 72%, 58%, 45% and 32% at each new size, and keeps the smallest file. Here is the important limit: it never goes below 640 pixels on the long side. Once an image reaches 640 pixels and is still too big, the tool stops and reports that the target was not reached.

The safe line is 10 x 1,000 x 0.94 = 9,400 bytes. The tool counts 1 KB as 1,000 bytes, following the decimal convention explained by NIST's page on binary prefixes. A portal that counts 1 KB as 1,024 bytes allows 10,240 bytes, so a file under 9,400 bytes passes either way.

What the tool returned for five test images

We used five synthetic images with no personal data: a 5.00 MB phone photo (4000 x 3000), a 5.27 MB photo of a printed page (3000 x 4000), a 682 KB cropped scan of that page (1500 x 1000), a 140 KB small portrait (480 x 640) and a 278 KB signature scan (1600 x 600). Each ran through the same code as the live tool with the target set to 10, in English and Indonesian, with identical byte counts.

Test imageOriginalResultQuality and pixelsStatus
Phone photo5.00 MB8,881 bytes32%, 640 x 480Fits
Signature scan278 KB8,031 bytes45%, 751 x 282Fits
Small portrait140 KB11,291 bytes18%, 480 x 640Over by 1,891 bytes
Cropped document682 KB21,216 bytes32%, 640 x 426Over by 11,816 bytes
Document photo5.27 MB24,538 bytes32%, 480 x 640Over by 15,138 bytes
Five bars against a dashed 9,400 byte safe line: phone photo 8,881 and signature scan 8,031 fit; small photo 11,291, cropped document 21,216 and document photo 24,538 stay over the line at the 640 pixel floor
Two of five images fitted under the 9,400 byte safe line. The other three reached the 640 pixel floor and stopped above it. Text and fine detail need more bytes than the tool can save without shrinking further.

The phone photo fitted because our synthetic photo has large smooth areas; the tool needed 24 attempts and finished at exactly 640 x 480 pixels. The signature needed 23 attempts but kept 751 pixels of width, because white paper costs almost nothing. The small portrait never entered the shrinking stage: at 480 x 640 it was already at the floor, so only quality could change, and quality 18% still left it 1,891 bytes over. The two document images failed by much more, because printed text is full of sharp edges.

Why the 640 pixel floor stops some images

The floor exists to protect you. Below about 640 pixels, a photo of a document or a face starts to lose the detail that makes it useful, and many forms reject images that small for anything other than a signature. So when the tool reaches 640 pixels and the file is still above 9,400 bytes, it does not keep going blindly. It gives you the smallest file it made and a clear message that the target was not reached.

Dokurapi Compress Image tool with target 10 and a 5.27 MB document photo, showing the message that the image was reduced but the target was not reached, with a 24.5 KB result at quality 32% and 480 x 640 px
What a miss looks like: the 5.27 MB document photo stopped at 24.5 KB and 480 x 640 pixels. The status line says the target was not reached, so this file should not be uploaded to a 10 KB form.

When you see that message, do not upload the result to a 10 KB form; it will be rejected. You have three honest options. Check whether the form really means 10 KB or perhaps 100 KB, which is a common typo in instructions. Crop the image harder so less content remains. Or shrink the pixels yourself before using the tool, which is what the next section tests. Our note on a file that is still too big covers the same choices for other limits.

Shrink the pixels first, then compress

Because the floor only applies to the shrinking stage, an image that is already smaller than 640 pixels goes straight to quality reduction. We made smaller copies of the three images that failed, using an ordinary image editor, and ran them through the tool again with target 10.

Four before and after pairs for a 10 KB target: small photo 11,291 bytes becomes 7,907 bytes at 300 x 400 and fits; document photo 24,538 bytes becomes 15,171 bytes at 450 x 600 and fails, then 7,914 bytes at 300 x 400 and fits; cropped document 21,216 bytes becomes 14,651 bytes at 600 x 400 and fails
Pre-shrinking outside the tool, then compressing with target 10. At 300 x 400 pixels both the portrait and the full page fitted; at 450 x 600 or 600 x 400 the text-heavy images still did not.

The portrait at 300 x 400 pixels came out at 7,907 bytes and fitted. The full page photo needed the same 300 x 400 size; at 450 x 600 it still weighed 15,171 bytes, while at 300 x 400 it dropped to 7,914 bytes. The cropped document at 600 x 400 stayed at 14,651 bytes even at quality 18%. The lesson is simple: for 10 KB, think in terms of about 300 x 400 pixels for a portrait or a page, and accept that small text will be hard to read. Our resize photo guide explains how to set exact pixels on a phone or a computer, and the explainer on image DPI shows why a DPI number does not change file size.

How a 10KB image looks

A 10 KB file is small enough that you should always look at it before uploading. The picture below shows two of our results side by side at their real pixel size.

Two 10 KB results side by side: on the left the 300 x 400 pixel page at 7.9 KB where the heading is clear but the small body text is barely legible; on the right the 751 x 282 pixel signature at 8.0 KB with clean, solid strokes
Left: the full page at 300 x 400 pixels and 7.9 KB, where the heading is clear but body text is barely legible. Right: the signature at 751 x 282 pixels and 8.0 KB, still clean. 10 KB suits signatures and small portraits, not documents meant to be read.

The signature looks almost unchanged, which is why 10 KB is a reasonable limit for signatures. The page shows the opposite: the heading survives, but the body text is close to unreadable. If a form asks for a scanned document under 10 KB, read the instructions again. It is more likely to mean a PDF of 100 KB or more, which our PDF to 100KB guide covers.

Which approach to use for common 10KB requests

Form asks forApproachExpected result
Signature under 10 KBCrop close to the ink, target 10, Shrink if neededFits easily; ours was 8,031 bytes
Small portrait under 10 KBResize to about 300 x 400 first, then target 10Fits; ours was 7,907 bytes
Thumbnail of a full photoTarget 10, Shrink if neededSmooth photos may fit at 640 px
Readable document under 10 KBCheck the instructions againText is barely legible at this size
Between 10 KB and 20 KB allowedType 20 instead of 10Much sharper result

When a form gives a range, such as 5 KB to 10 KB, the results above are safely inside it. If a file comes out below the minimum, our guide to increasing image size in KB explains the reverse direction.

Check the file before you upload it

Before uploading, confirm that the status line says the safe target was reached, that the byte count is under the form's limit, and that the image is still recognisable. Our guide on checking file size before upload shows how to read exact bytes on Windows, Mac, Android and iPhone, which matters when you are this close to a limit. Rename each download right away; the tool adds -dokurapi to the original name. For a broader overview of targets and settings, see how to compress an image.

Frequently asked questions

How do I compress an image to 10KB for free?
Crop the image, open the Dokurapi Compress Image tool, type 10 in Custom target (KB), keep Pixel size on Shrink if needed, press Compress photo and check that the status says the safe target was reached before you download.
What is the exact byte limit for 10KB?
The tool aims for at most 9,400 bytes, 6% under 10,000 bytes. That passes portals counting 1 KB as 1,000 bytes and portals counting it as 1,024 bytes (10,240 bytes).
Why does the tool say the target was not reached?
The tool does not shrink images below 640 pixels on the long side. If the file is still above 9,400 bytes at that size and quality 18% to 32%, it stops and tells you instead of producing an unusable file.
How can I make an image fit 10KB when the tool cannot?
Resize it to about 300 x 400 pixels in an image editor first, then compress with target 10. In our test both a portrait and a full page photo fitted at that size, at 7,907 and 7,914 bytes.
Can a signature be compressed to 10KB?
Yes, easily. Our 278 KB signature scan came out at 8,031 bytes with clean strokes, because white paper costs very few bytes.
Is a document still readable at 10KB?
Barely. At 300 x 400 pixels the heading of our test page was clear but the body text was close to unreadable. Check whether the form actually wants a PDF or a larger limit.
Is my image uploaded to a server?
No. Dokurapi compresses images inside your browser tab with the canvas API. The file is not sent to a server.
Which is better for small files, 10KB or 20KB?
If the form allows it, 20 KB. Doubling the budget lets the tool keep more pixels and higher quality, which makes text and faces far clearer.

Sources

  1. Prefixes for binary multiples, NIST
  2. HTMLCanvasElement: toBlob() method, MDN Web Docs

Need help?Result not quite right, or unsure about a form rule? Ask Dokurapi support on WhatsApp. Please do not send personal documents in chat.

Chat on WhatsApp

Related articles

Try Dokurapi for Free

No account needed. Pick a tool, drop in a file, and download the result, free.