Image

How to compress an image to 300KB in your browser

A 300 KB limit is generous for one photo, so most images fit without shrinking. Here are the steps, how the tool lowers quality one step at a time, and what four test images turned into.

Updated ยท 11 min read

Featured image: How to compress an image to 300KB in your browser, 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 300KB, open Dokurapi's free Compress Image tool, choose the photo, type 300 in the Custom target (KB) box, press Compress photo, and check the Output figure before you press Download result. The tool aims 6% below your number, so a 300 KB target means a JPG of at most 282,000 bytes. Nothing is uploaded; the photo is processed inside your browser tab. In our test a 5.00 MB phone photo came out at 252,295 bytes, 2400 x 1800 pixels at JPEG quality 44%, in about one second.

The good news is that 300 KB is a roomy budget for a single image. All three of our large test images fitted without dropping below 1500 pixels on the long side, and a 278 KB signature scan did not need compressing at all. This guide walks through the steps, the way the tool searches for a result, real numbers from four test images, and the cases where you should change the image first. For tighter limits, see our guides to 200 KB, 50 KB and 20 KB.

Steps to compress an image to 300KB

You need no account and no app. The tool makes a new JPG and leaves your original untouched.

  1. Check the current size. Your phone's file manager or the file properties on a computer show it. If the image is already under 300 KB and in the required format, you can upload it as it is.
  2. Open the Compress Image tool and choose one image. It accepts JPG, PNG and WebP. For iPhone photos in HEIC, convert first with our HEIC to JPG guide.
  3. Type 300 in the Custom target (KB) box. The preset menu offers 100 KB, 200 KB, 500 KB, 1 MB and 2 MB, so 300 needs the custom box. A custom number always wins over the menu.
  4. Leave Pixel size on Shrink if needed unless the form demands exact pixel dimensions. This setting caps the longest side at 2,400 pixels and only shrinks further when quality alone is not enough.
  5. Press Compress photo. Large phone photos take about a second on a laptop.
  6. Read the result box and open the file. It shows the original size, the output size, the final quality and the pixel size. Zoom in on faces, text or signatures before you upload.
Dokurapi Compress Image tool with 300 typed as the custom target, showing a 5.00 MB phone photo reduced to 252 KB at quality 44% and 2400 x 1800 px
Our first test in the live tool: a synthetic 5.00 MB phone photo with 300 typed in Custom target (KB). The safe target was reached at 252 KB, with quality 44% and the longest side capped at 2,400 pixels.

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

Open the Compress Image tool

How the tool reaches a 300KB file

The tool works in three stages. First it draws the image on a canvas with the longest side capped at 2,400 pixels, which already removes most of the weight from a 12 megapixel phone photo. Then it saves a JPG at the starting quality, 84% by default, and measures it. If the file is still over the safe line, it lowers the quality by 10 points and tries again, up to seven times, never going below 18%. The quality value is passed to the browser's JPEG encoder, described in MDN's toBlob reference.

Only if quality 18% is still too big does the third stage start: the tool shrinks the pixel size step by step, retrying at quality 72%, 58%, 45% and 32%, and stops at 640 pixels on the long side. For 300 KB that third stage almost never runs, because the budget is large enough for a full 2,400 pixel image.

The safe line is 300 x 1,000 x 0.94 = 282,000 bytes. The tool counts 1 KB as 1,000 bytes, the decimal convention described by NIST, and the 6% margin covers portals that count 1 KB as 1,024 bytes or round sizes. Our guide to compressing an image explains the same steps for every size.

Paired bars showing the JPG size of a phone photo and a document photo at each quality step from 84% to 18%, with a dashed safe line at 282,000 bytes; the phone photo stops at 44% and the document photo at 24%
The quality staircase for two of our test images, measured with the same canvas path the tool uses. The phone photo first fitted under 282,000 bytes at 44%. The document photo, full of fine text and paper grain, had to go down to 24%. Dashed bars were never made.

What the live tool returned in our tests

We made four synthetic images with no personal data: a colourful phone style photo at 4000 x 3000 pixels, a photo of a printed page at 3000 x 4000 pixels, a 1500 x 1000 crop of that page, and a scanned signature at 1600 x 600 pixels. Each went through the live tool with a 300 KB custom target and the default settings.

Compress image to 300KB: results on four test images (November 2026)
Test imageOriginalResultQuality and pixelsNote
Phone photo5.00 MB, 4000 x 3000252,295 B44%, 2400 x 1800Fitted on the fifth quality step
Document photo5.27 MB, 3000 x 4000221,357 B24%, 1800 x 2400Needed the seventh step
Cropped document682 KB, 1500 x 1000239,433 B64%, 1500 x 1000Smaller image, higher quality kept
Signature scan278 KB, 1600 x 600171,639 B84%, 1600 x 600Already under the target; keep the original

Two lessons stand out. The pixel size of the input matters more than its file size: the 682 KB crop kept quality 64% because it had far fewer pixels than the 5 MB photos. And busy detail costs bytes: the document photo, covered in small text and paper grain, needed a much lower quality than the phone photo at the same pixel count.

Four bars against a dashed 282,000 byte safe line: phone photo 252,295, document photo 221,357, cropped document 239,433, and a dashed outline for the 278,141 byte signature scan that was already under the line
The four results against the 282,000 byte safe line. Three images were compressed to fit, and the signature scan was already small enough, so the tool advised keeping the original file.

When the image is already under 300KB

Our signature scan was 278,141 bytes before we touched it. That is under 300 KB and even under the 282,000 byte safe line, so the tool showed a message saying the original does not need compressing. It still produced a 171,639 byte JPG, because some portals require JPG and the original might be a PNG or WebP. If your file is already a JPG under the limit, upload the original: it has not lost any detail.

The same applies the other way. If a form asks for at least a certain size, such as a minimum of 100 KB for a passport scan, compressing far below that can get the file rejected. Our guide to increasing an image size in KB covers that rarer case.

A quick way to decide is to compare bytes, not rounded KB. 300 KB is 300,000 bytes in decimal counting, or 307,200 bytes on a portal that uses 1,024. A file of 290,000 bytes passes both, but it sits above the tool's 282,000 byte safe line, so the tool would still compress it a little. If you would rather keep the untouched original and it is under the form's own limit, the original is fine to use.

Dokurapi Compress Image tool showing a 278 KB signature scan with the message that the original is already under the 300 KB target
When the image is already under the target, the tool says so and recommends keeping the original. The 172 KB JPG below the message only helps if the portal insists on JPG.

How a 300KB image looks

For a photo of a person or a place, 300 KB at 2,400 pixels looks clean on a phone and on most laptop screens. Quality 44% sounds low, but at that pixel count the compression artefacts are small, and the photo is far sharper than one shrunk to 800 pixels at high quality.

Documents are the harder case. At quality 24% our page photo still read clearly at normal zoom, as the comparison below shows, but fine paper texture turned flat and very small print would begin to blur. If the image is a document, crop away the table, the background and the margins before compressing. Our photo cropping guide shows how. A tighter crop has fewer pixels, so the tool can keep a higher quality, exactly like our 1500 x 1000 crop that stayed at 64%.

Side by side crop of the same lines of printed text from the original document photo and from the 300 KB result, both readable
The same patch of the document photo before (5.27 MB) and after compressing to 300 KB (221 KB at quality 24%), shown at the same size. The text stays readable; the paper grain is smoothed out.

When the form also asks for pixel dimensions

Some forms ask for both a file size and a pixel size, for example a photo under 300 KB and exactly 600 x 800 pixels. The compressor does not crop or resize to exact numbers; it only shrinks when it has to. Resize first with our guide to resizing a photo, then compress the resized file to 300 KB. A 600 x 800 image almost always fits under 300 KB at high quality.

Pixel size and DPI are often confused on forms. A request for 300 DPI is about print resolution, not file size, and the two do not convert directly. Our explainer on image DPI sorts out what forms usually mean.

Which setting to use for common 300KB requests
What the form saysPixel size settingWhat to do first
Photo under 300 KB, no pixel ruleShrink if neededNothing, compress directly
Under 300 KB and exact pixelsShrink if neededResize or crop to the exact pixels
Under 300 KB and keep full resolutionKeep original sizeExpect a lower quality result
JPG only, file is PNGShrink if neededCompress; the output is always JPG

PNG screenshots and transparent images

The tool always saves a JPG, and JPG has no transparency. Transparent areas of a PNG are filled with white, which is right for most forms but wrong for a logo that should sit on a coloured background. Screenshots with large flat areas of colour are often smaller as PNG than as JPG, so compare both sizes before you decide. Our PNG to JPG guide explains when the switch helps.

Before uploading, confirm the number of bytes in the result box, the file type the form wants, and the file name. The image never left your device, as our note on checking file size before upload also explains, so you can repeat the process as often as you like.

If you are preparing several images for one application, such as a passport photo, an ID card and a certificate, do them one at a time and rename each file as soon as it downloads. The tool names its output after the original with -dokurapi added at the end, so the compressed copy and the original are easy to tell apart in your downloads folder.

Frequently asked questions

How do I compress an image to 300KB for free?
Open the Dokurapi Compress Image tool, choose the image, type 300 in the Custom target (KB) box, press Compress photo and download the result. It is free, needs no account, and the image stays in your browser.
Will compressing to 300KB make my photo blurry?
Usually not. With Shrink if needed, the tool keeps up to 2,400 pixels on the long side, and in our test a 5 MB phone photo fitted at quality 44%, which still looks clean on most screens. Documents full of small text need a lower quality, so crop them first.
Is 300KB the same as 0.3MB?
Yes in decimal units, where 1 MB is 1,000 KB. Systems that use 1,024 count 300 KB as 307,200 bytes. The tool aims at 282,000 bytes so the file passes either way.
Why is my result well under 300KB?
The tool stops at the first quality step that fits under the safe line. Our document photo ended at 221,357 bytes because the step before it was still too big, and the tool does not go back up to fill the gap.
Can I keep the original pixel size?
Yes. Set Pixel size to Keep original size (no resize). Only the JPEG quality is lowered then, so a large photo may end at a much lower quality, or may not reach the target at all.
Does the tool work with PNG and WebP?
Yes. It accepts JPG, PNG and WebP and always saves a JPG. Transparent areas become white.
Is my photo uploaded to Dokurapi?
No. The image is read and compressed by your browser on your own device and is never sent to a server.
Can I compress an image to 300KB on my phone?
Yes. The tool works in mobile browsers such as Chrome and Safari, and you can pick the photo straight from your gallery.

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.