Updated · how we check
Compress an image to 4 MB
To get an image under 4 MB, PixelFit aims at 4,000,000 bytes or less, so forms counting a megabyte as 1,000,000 or 1,048,576 bytes both accept it. That is roomy: by our estimate (extrapolated from encodes up to 3,000 px) a full 12 MP phone photo (4032 × 3024) fits at quality 88, with no resizing.
Under 4 MB
JPG · under 4 MB (at most 4,000,000 bytes) · original pixel size · white background
PixelFit aims at 4,000,000 bytes or less, so the file passes whether the form counts 1 MB as 1,000,000 or 1,048,576 bytes.
Fit, background and padding white background
Saving presets is part of Pro.
The result appears here: the exact byte count, pixel size and quality, the size before and after, a preview and a download button.
The batch kit (one ZIP for up to 500 photos, several photos merged into one PDF) is part of Pro.
What 4 MB means in bytes
4 MB is 4,194,304 bytes when a megabyte is 1024 × 1024 bytes and 4,000,000 bytes when it is 1000 × 1000. For megabyte limits PixelFit aims at 4,000,000 bytes or less (4 × 1,000,000), which passes both readings, and also the 4,096,000 bytes a server gets when it counts 4,096 KB of 1000 bytes. The exact byte count is printed, so you can compare it with the form.
The safety margin costs 194,304 bytes, 5 % of the binary reading. For a 4:3 photo at quality 75 that is the difference between 5,214 × 3,910 (extrapolated) and 5,076 × 3,807 (extrapolated) pixels, so playing safe loses little.
Largest pixel size that fits 4 MB
The biggest image of each kind, in its own aspect ratio, that stays at or below 4,000,000 bytes.
| Image | JPG q60 | JPG q75 | JPG q90 | WebP q75 |
|---|---|---|---|---|
| Head-and-shoulders portrait | over 7,158 × 8,940 | 6,710 × 8,380* | 4,694 × 5,862* | over 7,158 × 8,940 |
| Outdoor landscape (12 MP phone photo) | 5,895 × 4,421* | 5,076 × 3,807* | 3,846 × 2,884* | 5,776 × 4,332* |
| Scanned typed document page | over 7,136 × 8,967 | over 7,136 × 8,967 | 4,836 × 6,077* | over 7,136 × 8,967 |
| Handwritten letter with signature | over 8,823 × 7,253 | over 8,823 × 7,253 | 6,303 × 5,181* | over 8,823 × 7,253 |
A 12 MP phone photo at 4 MB
Our 12 MP landscape sample (4032 × 3024) is about 4.15 MB at quality 90 and 3.81 MB at quality 88, under 4 MB (extrapolated from encodes up to 3,000 px). Here the tool keeps every pixel and only lowers quality (it starts at 92); a noisier photo may still need a small resize.
JPEG quality for fixed pixel sizes under 4 MB
When a form fixes the pixels, only quality can move. Highest quality (of 100) that keeps each size at or under 4,000,000 bytes:
| Pixel size | Measured on | JPG | WebP |
|---|---|---|---|
| 1080 × 1080 (square social post) | landscape photo | quality 95+ (640 KB) | quality 95+ (596 KB) |
| 1920 × 1080 (Full HD frame) | landscape photo | quality 95+ (1.09 MB) | quality 95+ (1.01 MB) |
| 2480 × 3508 (A4 page at 300 DPI) | scanned typed page | quality 95+ (2.05 MB) | quality 95+ (1.45 MB) |
| 3000 × 4000 (12 MP portrait frame) | portrait photo | quality 95+ (2.58 MB) | quality 95+ (1.86 MB) |
| 4032 × 3024 (12 MP phone photo) | landscape photo | quality 88 (3.81 MB) | quality 89 (3.75 MB) |
| 6000 × 4000 (24 MP camera photo) | landscape photo | quality 64 (3.79 MB) | quality 75 (3.68 MB) |
JPG, WebP or PNG at 4 MB
At quality 75, WebP holds 5,776 × 4,332 (extrapolated) of the landscape photo in 4 MB, JPG 5,076 × 3,807 (extrapolated): 29 % more pixels. A moderate gain at 4 MB. Many portals accept only JPG/JPEG, so this page starts in JPG.
A full-colour PNG is lossless, so its size follows the content. In 4 MB it holds a flat graphic of more than 9,561 × 6,692 pixels but a photo of only 1,638 × 1,228, against 5,076 × 3,807 (extrapolated) as a quality-75 JPG. Reducing a PNG to a palette of up to 256 colours (PixelFit does this when a PNG must shrink) helps graphics far more than photos.
4 MB is a quality decision
With 4,000,000 bytes, a 4:3 photo at quality 90 can be 3,846 × 2,884 (extrapolated) and a lossless PNG photo 1,638 × 1,228. A full 12 MP frame fits at quality 88 (extrapolated); a 24 MP camera photo (6000 × 4000) fits at quality 64 (extrapolated).
How to compress an image to 4 MB
-
Open the tool above
It is preset to 4 MB (4,000,000 bytes or less), JPG output.
-
Add your image
Drop, paste or pick it; a PNG, WebP or (where the browser opens it) HEIC file becomes a JPG under 4 MB.
-
Pixel size: only if asked
On auto, a 12 MP photo keeps all its pixels; quality goes to about 88 by our estimate.
-
Download and check
name-4mb.jpg comes with its byte count, pixels and quality.
Forms that ask for 4 MB
Upload specs in our dataset with exactly 4 MB. Verify with the official notice before you submit.
Sources
- Measured by PixelFit with sharp 0.35.5 / libvips 8.18.7 on 31 October 2026.
- Sample images, Wikimedia Commons, checked 31 October 2026: landscape (CC0 1.0) commons.wikimedia.org/w/index.php?curid=154070378; portrait commons.wikimedia.org/w/index.php?curid=23956389; typed page commons.wikimedia.org/w/index.php?curid=194775753; handwritten letter commons.wikimedia.org/w/index.php?curid=90423615; flag commons.wikimedia.org/w/index.php?curid=361734 (public domain).
- Binary prefixes, NIST, checked 31 October 2026: physics.nist.gov/cuu/Units/binary.html
Frequently asked questions
How do I compress an image to 4 MB?
Drop it into the tool here, preset to 4 MB. It searches JPEG quality (at most 8 encodes per pixel size), then scales pixels down if needed, until the file is 4,000,000 bytes or less. By our estimate (extrapolated), a 12 MP photo fits with all its 4032 × 3024 pixels at quality 88.
How do I compress an image to less than 4 MB without losing quality?
At 4 MB there is little to give up: a 12 MP photo fits with all its pixels at quality 88, about 3.81 MB (extrapolated).
Is 4 MB 4,000,000 or 4,194,304 bytes?
Both readings exist: 4,194,304 bytes (1 MB = 1024 × 1024) or 4,000,000 bytes (1 MB = 1000 × 1000). PixelFit aims at 4,000,000 bytes or less, which passes both.
Can I compress a PNG to 4 MB?
Yes, but a full-colour PNG photo stays big: about 1,638 × 1,228 pixels in 4 MB, versus more than 9,561 × 6,692 for a flat graphic. As a JPG the photo reaches 5,076 × 3,807 (extrapolated).
Does a phone photo fit 4 MB without resizing?
Yes, at a lower quality: our 12 MP sample is 4.15 MB at quality 90 and fits 4,000,000 bytes at quality 88 (3.81 MB) (extrapolated).
Related
Nearby file sizes
- Compress to 3 MB photo ≈ 4,315 × 3,236
- Compress to 2 MB photo ≈ 3,432 × 2,574
- Compress to 1.5 MB photo ≈ 2,918 × 2,188
- Compress to 5 MB photo ≈ 5,758 × 4,318
- Compress to 10 MB photo ≈ 8,515 × 6,386
More ways to hit 4 MB
- JPG to PDF under 4 MB One image as a PDF
- Image resizer with KB target Any size, pixels and format
Pixel sizes that fit 4 MB
- A3 (297×420 mm) about 3.48 MB as a quality-75 JPG
- 4000×4000 square about 3.23 MB as a quality-75 JPG
- 5120×2880 (5K) about 3 MB as a quality-75 JPG
- 11×14 inch print about 2.84 MB as a quality-75 JPG