File & Image Formats

File Formats From the Ground Up: Extensions, Compression, and Safe Conversion

The phone saves a photo the upload form refuses. The scanned contract is "too large to attach". The logo you sent the printer looked sharp on screen and turned to mush on the banner. Sooner or later every file ends up in the wrong shape for the job — and every fix is some flavour of convert it.

One idea makes all of those fixes make sense: a file format is a bargain about what to keep, and converting a file renegotiates that bargain. Some conversions keep everything and merely repackage it. Others quietly discard detail that no later step can recover. Learn to tell the two apart and the rest is just picking the right target format — which this guide maps, family by family.

What a file format actually is

A file is a long string of bytes. A format is the agreed set of rules for what those bytes mean: which ones mark the start, how the content is arranged, and how a program should rebuild the picture, text, or sound from them. Every PNG in the world opens with the same eight signature bytes — that is how software recognises one without being told.

The extension — .jpg, .pdf, .docx — is a label taped to the outside, nothing more. Renaming holiday.heic to holiday.jpg changes the label and not one byte of the contents. Programs that trust the label get confused; programs that read the bytes report, correctly, that this was never a JPG. Converting a file means decoding it under the old rules and re-encoding it under new ones, and only a converter does that.

This is also why "my computer can't open it" is usually a missing-rules problem rather than a broken-file problem. Many phones save photos as HEIC by default, and plenty of older software simply doesn't speak HEIC. The file is fine. Converting a copy to JPG translates it into a language everything understands.

Lossless vs lossy: the one-way door

Almost every format question comes down to which side of this line you are standing on.

Lossless formats and compressors — ZIP, PNG, FLAC — store the same information in less space by describing patterns compactly, and they are fully reversible. Compress, decompress, and you have the original, byte for byte, every time.

Lossy formats — JPG, MP3, and the default modes of WebP and AVIF — first discard detail a human is unlikely to notice, then compress what survives. That is why they achieve dramatically smaller files, and it is also the catch: the discarded detail is gone permanently. Converting a JPG to PNG later gives you a perfect lossless copy of the damaged version — the missing detail does not come back.

Worse, lossy loss compounds. Open a JPG, tweak it, save it, and the encoder discards a little more; do that repeatedly and the smudging accumulates. This is generation loss, and the defence is a habit, not a tool: keep one original in the best quality you have, edit from it, and export a fresh copy for each destination. Never treat a lossy export as the master.

Making a file smaller: resize, compress, or both

"Make it smaller" hides two different operations, and knowing which one you need prevents most quality disasters.

Start with why files are big. An image stores colour values for every pixel. A 12-megapixel photo is 4000 × 3000 = 12,000,000 pixels; at the common 3 bytes per pixel — one each for red, green, and blue — that is 36,000,000 bytes, or 36 MB uncompressed (decimal MB; 34.3 MiB in binary units, rounded to 1 dp — the full size ladder from bits to terabytes explains that split). Compression is the only reason photos are ever emailable.

From there you have two levers:

  • Resizing removes pixels. A photo destined for a form or a chat rarely needs more than screen resolution, and scaling it down shrinks the file roughly with the pixel count. It is permanent for that copy — you cannot scale detail back up — which is one more reason to keep the original.
  • Compression settings decide how aggressively the encoder discards and packs. Most converters expose this as a quality slider; the visible damage arrives at the low end, so modest settings are usually indistinguishable from the source.

For the classic "must be under 2 MB" upload: resize a copy to the dimensions the destination actually displays, then apply moderate lossy compression. Doing it in that order keeps quality; cranking compression on a full-size image throws detail away everywhere to save space you could have freed by resizing.

The format families at a glance

Format Kind What it keeps Reach for it when
JPG Lossy image Photos, no transparency Maximum compatibility for photographs
PNG Lossless image Exact pixels, full transparency Screenshots, graphics, anything with text
WebP / AVIF Lossy or lossless image Small files, transparency, animation Images published on the web
SVG Vector graphic Shapes, not pixels — scales forever Logos, icons, diagrams
PDF Fixed document Layout frozen on every device Sharing documents that must not reflow
DOCX / XLSX Editable document Structure, formulas, edit history Work that will be revised
TXT / CSV / JSON Plain text Just characters, readable anywhere Data and notes meant to last
MP3 / AAC Lossy audio Small, universally playable sound Listening copies
FLAC Lossless audio Exact original audio, smaller than WAV Archiving music
WAV Uncompressed audio Raw samples, large Recording and editing
ZIP Lossless container Other files, packed and bundled Sending many files as one

A few notes the table can't hold. For images, the real decision is between the raster formats, and it depends on what the picture contains — the image format decision in full walks through photos, screenshots, transparency, and the conversion traps. What a pixel's colour values actually mean is its own small subject, covered in the colour formats guide.

For documents, the choice is about control: PDF freezes layout so it survives any device, while DOCX stays editable — and is, surprisingly, a ZIP archive of XML files under the hood. Plain text is the most durable format ever shipped; its one gotcha is character encoding, which is explained in the text tools guide.

And ZIP deserves one clarification: zipping is packaging, not conversion. The files inside are unchanged, and already-compressed formats like JPG and MP3 barely shrink further — a ZIP of photos is mostly a convenience for sending, not a size win.

When to convert — and when to leave the file alone

Convert when the destination demands it: a form that only takes PDF, a printer that needs vector artwork, software that predates your phone's default photo format. Convert when size genuinely blocks you, using the resize-then-compress order above. And convert to plain, open formats when you want something readable in twenty years.

Skip the conversion when you are hoping it will improve the file — it cannot. A low-quality MP3 converted to FLAC is a big file of the same low-quality sound; a blurry JPG becomes a crisp-looking filename and the same blurry pixels. And never round-trip between lossy formats to "refresh" a file: every pass through a lossy encoder is another visit to the one-way door.

Converting without wrecking anything

The safe procedure is short:

  1. Start from the best original you have, never from an earlier export.
  2. Convert a copy. The original stays untouched, whatever happens.
  3. Pick the target by destination, using the table above, not by habit.
  4. Check the output before sending — open it, zoom in on edges and text, confirm transparency survived and pages didn't shift.
  5. Know what happens to metadata. Conversion can strip dates, camera details, and location data. Sometimes that is a loss; for a photo posted publicly, it is often exactly what you want.

Where you do the converting matters too. For anything sensitive, prefer tools that run in your browser so the file never leaves your device — the checklist for choosing a trustworthy free tool covers the signals. That in-browser approach is precisely what Medley Web is building for everyday conversions.

FAQ

Can I change a file format by renaming the extension? No. The extension is a label; the bytes stay in the old format, and software that reads the actual contents will fail or misbehave. Use a converter, which decodes and re-encodes the data.

Will converting a JPG to PNG improve its quality? No. PNG faithfully preserves whatever it is given — including the detail the JPG already discarded. Converting stops further loss but recovers nothing.

Why did my file get bigger after converting? You likely moved from a lossy format to a lossless one — a JPG re-saved as PNG stores every pixel exactly and typically grows several times over. Bigger is not better here; it is the same picture in a roomier container.

Is it safe to convert files with a free online tool? For non-sensitive files, generally yes. For contracts, IDs, and private photos, prefer converters that run in the browser so nothing is uploaded, and check the tool honestly says how it handles files.

Should I archive photos as JPG or PNG? Keep whatever the camera produced as the untouched master — that is the most detail you will ever have — and export copies for sharing. Re-encoding your only original, in either direction, only risks loss.


Every format is a bargain; conversion is renegotiation. Keep the original, convert a copy, check the result — and when you just need the answer now, convert everyday files and formats free at Medley Web.

Comments are disabled for this article.