FormatSwap › Formats › The perfect format

The perfect format

It doesn't exist, and it can't. But we can say exactly what it would need to do, and one real format comes startlingly close.

Why there can't be just one

After judging dozens of formats, it's tempting to imagine one file type that could replace them all. It would fail, because the best formats are pulling against limits that can't be engineered away.

  • Size against accuracy. Information theory sets a floor on how small a perfect copy can be. To go lower, you have to throw information away, so a format has to decide what it's willing to lose. A court recording and a video call want different answers.
  • Fixed against flexible. A contract must look identical everywhere, while a novel should reflow to fit your phone. The same page can't do both at once.
  • Simple against capable. Every feature makes a format harder to implement, and harder to keep readable in a hundred years. SRT and ASS subtitles sit at opposite ends of that line, and both are right.
  • Reach against progress. The best format that nobody can open is worse than a mediocre one that everybody can. JPEG's biggest advantage over its successors is that it got there first.

So the perfect format isn't a single file type. It's a set of qualities that the right format for each job should have. Here's our list.

The seven tests

  1. Free. A public specification, with no royalties and no licence to ask for. Nobody can switch it off, and you never need a company's permission to open your own files. It has no DRM, because a file that depends on someone else's server isn't fully yours.
  2. Simple. One capable programmer can write a working reader from the documentation alone. This is the real test of longevity: a format stays alive as long as someone can rebuild its reader.
  3. Everywhere. It opens on the devices people own, without installing anything. A format's quality means little if your recipient sees an error message.
  4. Efficient. It's about as small as its job allows, and fast enough to decode on a cheap phone with no noticeable battery drain.
  5. Detects damage. It contains checksums, so it can tell you when it's been corrupted. Silent corruption is the worst kind, because you might not find out until your backups have also gone bad.
  6. Survives damage. One bad block costs you one moment, not the whole file. A readable index isn't a single point of failure, and a recording that's cut short is still playable up to that point.
  7. Safe. Opening a file should never run a program. Hidden data, such as a photo's GPS location, should be easy to see and remove, not buried in the file.

What it would look like

If we were designing it from scratch for, say, a family's photos and videos, this is roughly the structure it would have. It's a thought experiment and not a real format:

IDENTITY     what this file is, and which version of the format
QUALITY      lossless, or lossy, and how many generations of loss
FRAMES       small blocks, each with its own checksum and timestamp
             (lose one block, keep every other block)
INDEX        a copy at each end, for fast seeking and for recovery
METADATA     a visible, separate section: remove it with no re-encoding
CHECKSUM     one final value that verifies the whole file

The specification would fit in a few dozen pages, and come with public test files and a public-domain reference decoder. The “quality” line is the small idea that we'd most like to see in the real world: a file that honestly says “I've been through lossy compression three times” would put an end to fake lossless downloads, and to quality quietly wearing away with each re-save.

How real formats score

Our own judgement against the seven tests, each for the format's main use. “Efficient” means for the job the format is meant to do.

FormatFreeSimpleEverywhereEfficientDetects damageSurvives damageSafe
FLACYesYesPartlyYesYesYesYes
Plain text (UTF-8)YesYesYesPartlyNoYesYes
PNGYesYesYesPartlyYesPartlyYes
MP3YesYesYesPartlyPartlyYesYes
OpusYesPartlyPartlyYesPartlyYesYes
EPUBYesPartlyPartlyYesYesPartlyPartly
MKVYesPartlyPartlyYesPartlyYesYes
JPEGYesYesYesPartlyNoPartlyYes
AVIFPartlyNoPartlyYesNoNoYes
PDF/AYesNoYesYesNoNoYes
MP4 with H.264NoPartlyYesYesNoNoYes

The closest thing we have: FLAC

Measured against those tests, the winner is FLAC. It's not the most famous or the most widely used format on this site, but it has the best record on the things that make a format good.

  • It's free, with no patents to worry about, and since December 2024 it has been specified in an IETF standard, RFC 9639.
  • It's lossless, and takes about half the space of the original audio.
  • It stores a fingerprint of the original audio, and each small frame has its own checksum, so it can confirm that every sample is exactly right.
  • Damage is local: a player can find the next frame and carry on.
  • It decodes easily even on low-powered devices, and can't run scripts.

Its one “partly” is reach. Some car stereos and Apple's music apps treat it as a second-class citizen, and nearly all of that is a matter of choice, not technology.

Of course it only handles audio, and only one half of the audio problem: nobody's streaming FLAC on a poor mobile signal. That's the point. A perfect format is one that does a single job with nothing left to apologise for. FLAC is about as close as any file has come.

The runner-up is the humblest format of all: plain UTF-8 text. It can't detect its own damage, but a damaged text file is still mostly readable by anyone, on anything, and that's likely to remain the case for as long as there are computers.

The best choice for each job today

The perfect format doesn't exist, but these are the ones we'd pick right now. Not all of them score well above: sometimes reach has to win.

The jobUse
Sharing a photoJPEG
Images on a websiteAVIF
Screenshots, logos and graphicsPNG
Scalable logos and iconsSVG
Raw camera filesDNG
Sharing a videoMP4
Keeping your own video libraryMKV
Music you're keeping for goodFLAC
Music for any deviceMP3
Voice and low-bandwidth audioOpus
Audio you're editingWAV
Subtitles for films and TVSRT
Captions on a websiteVTT
A finished documentPDF
A document still being editedDOCX
BooksEPUB
ComicsCBZ
Notes that must lastPlain text

What's coming

JPEG XL is the most interesting candidate for photos. It can shrink an existing JPEG by about a fifth with no further quality loss and restore the original exactly, a uniquely painless way to migrate. Safari has supported it since 2023, while Chrome and Firefox both moved to bring it back during 2026. If it reaches every browser, it could earn a real shot at replacing JPEG and PNG for many uses.

AV2, whose specification was finalised in 2026, is expected to bring about 30% better compression than AV1. The hardware isn't there yet, and history says that it'll be years before you can count on it.

Neither will change the deeper lesson. New formats arrive with big promises about size. The ones that last are usually the ones that keep the promises made here.

How to live without it

  • Keep the original. Treat conversions as copies. Formats change, and a good original lets you make a new copy tomorrow. It's why our apps never overwrite your files.
  • Store one way, share another. Use FLAC, DNG, MKV and PNG for what you're keeping. Use MP3, JPEG and MP4 for what you're sending.
  • Avoid lossy-to-lossy chains. Every re-encode loses something you can't get back. Always go back to the best version you have.
  • Avoid locks. Prefer anything without DRM, no matter how convenient the locked version seems today.
  • Check back every few years. Old formats die slowly, then all at once. If your files are in something that's on our discontinue list, move a copy while it's still easy.

Convert your files, on your own PC

FormatSwap's apps are free and work offline, and your originals are never changed.

Media Converter

Videos, audio, subtitles and images.

Download Media Converter
Version 1.1 · Windows 10 & 11 (64-bit) · 64 MB · No installation needed

PDF Converter

PDFs and eBooks.

Download PDF Converter
Version 1.1 · Windows 10 & 11 (64-bit) · 86 MB · No installation needed