Skip to content
CompressFilesSize
Fundamentals8 min read·Updated December 2, 2026

How to Compress Files Without Ruining Them

File compression is not one trick. A ZIP, a JPEG, and an MP4 each shrink for different reasons, and the setting that saves 80% on a screenshot can destroy a video. This guide walks through the decision in the order that matters: identify the file, choose the right lever, then check the real byte size.

First, identify what you are compressing

There are two families of files. Uncompressed or lightly compressed formats still have room: BMP, TIFF, WAV, plain text, CSV, JSON, and many PDFs built from scans. Formats that are already compressed are close to their floor: JPEG, PNG, WebP, GIF, MP4, WebM, MP3, ZIP, DOCX, and XLSX.

That distinction predicts the result. Repacking a folder of text into a ZIP can cut it in half. Repacking a folder of phone photos into a ZIP will change almost nothing, because each JPEG is already compressed. If the goal is a smaller total, work on the media first and archive second.

  • Text, code, CSV, JSON, logs: ZIP compression works well.
  • Photos: re-encode as JPG or WebP and resize.
  • Animated GIF: reduce dimensions, colors, and frame count.
  • Video: lower resolution and bitrate, then re-encode.
  • PDF: re-export with compressed images; zipping does little.
  • DOCX/XLSX: already zipped internally, so zipping again adds overhead.

Compressing photos without visible damage

A phone photo is usually 3–8 MB because it stores 12 million pixels at high quality. Very little of that is needed for a screen. Resize the long edge to 1920 px for web use or 1600 px for email, then encode at 78–82% quality. The result is typically 300–600 KB with no difference you can see at normal viewing size.

Keep the original. JPEG is lossy, and every re-encode throws away a little more detail. Compress a copy for the destination, and archive the master separately. If you need transparency, use PNG for flat graphics or WebP for photographs with alpha.

  • Web hero image: 1920 px, 80% quality, WebP or JPG.
  • Email photo: 1600 px, 78% quality.
  • Avatar: 800 px square, 80% quality.
  • Screenshot with text: PNG or high-quality WebP, not low-quality JPG.

Video: resolution beats quality sliders

Video size is bitrate multiplied by time. A 10-minute 1080p clip at 8 Mbps is about 600 MB; the same clip at 720p and 2.5 Mbps is under 200 MB. Dropping resolution cuts the pixel count, which lets the encoder spend fewer bits per second while keeping the picture clean.

For chat apps, 480p is often enough. For a presentation recording, 720p with crisp text is the better trade. Re-encoding always takes time, and browser-based encoding runs in real time because it uses the device's media pipeline.

ZIP files: what helps and what does not

ZIP applies deflate to each file inside. Text shrinks; media does not. A ZIP of source code can drop 60–80%. A ZIP of JPEGs may actually grow slightly because the container adds headers.

The reliable wins are removing __MACOSX resource forks, .DS_Store files, Thumbs.db, and duplicate copies. If an archive must fit a limit, shrink the largest files inside it first, then rebuild the ZIP.

Use a target size when a form gives you one

Most upload failures are not about compression in general; they are about a hard number. A 10 MB portal, a 25 MB Gmail attachment, a 1 MB avatar field. Start with the target, then let the tool choose quality and dimensions. A measured target avoids the loop of compressing, uploading, and being rejected.

For images, a target-size compressor can binary-search quality and then reduce dimensions until the file fits. For video, the bitrate is calculated from the duration; if the encoder overshoots, lower the resolution and run it again.

A five-minute workflow that works

Group the files by type, compress each group with the right tool, then check the total. If a portal has a combined limit, build one ZIP at the end. Keep the originals until the upload succeeds.

  • Photos: resize to 1920 px, quality 80%.
  • GIFs: width 640 px, 128 colors, keep every frame.
  • Video: 720p balanced for under a minute, 480p for longer.
  • Documents: export a lighter PDF, then ZIP the set.
  • Verify the final size in bytes before uploading.

What not to do

Do not re-compress the same JPEG five times hoping for a smaller result; you will lose quality and stop saving bytes. Do not rename a file to .zip and assume it compressed. Do not lower video quality to 10% before trying a smaller resolution. And do not upload private documents to a random server when the browser can do the work locally.

Try it

Compress a file now

Images, GIFs, video, ZIPs, and documents — processed on your device.

Open the compressor

Written by the CompressFilesSize editorial desk. We test every recommendation in a current desktop and mobile browser, and we publish the actual behaviour of the tool rather than theoretical compression ratios.