Sign in

H.264 vs H.265 vs VP9

H.264 unless you have a specific reason. H.265 or VP9 when file size matters more than compatibility.

Short answer

Use H.264 for anything that has to play everywhere — it is the only codec supported by essentially every device made in the last fifteen years. Use H.265 or VP9 when file size matters more than universal playback; both produce roughly 30–50% smaller files at the same quality, at the cost of slower encoding and patchier support.

H.264 vs H.265 / VP9, side by side

H.264 vs H.265 vs VP9 compared across 7 aspects
AspectH.264H.265 / VP9
CompatibilityUniversalGood but not universal
File size at equal qualityBaseline30–50% smaller
Encoding speedFastConsiderably slower
Decoding on older devicesHardware accelerated everywhereOften software — drains battery
LicensingPatent pool, widely licensedH.265 complex; VP9 royalty-free
Browser supportEvery browserVP9 yes; H.265 partial
Best for archivingLarger filesSmaller at same quality

Why H.264 is still the default

H.264 dates from 2003, and that age is exactly its advantage: hardware decoders for it exist in every phone, TV, browser and set-top box shipped since. When a video plays instantly and without draining the battery, that is dedicated silicon doing the work.

Newer codecs only get that treatment on newer hardware. A VP9 or H.265 file on an older device falls back to software decoding, which is slower, hotter and heavier on battery — a worse experience despite the technically better codec.

What the newer codecs buy you

Both H.265 and VP9 typically deliver the same perceived quality at 30–50% less data. For streaming at scale that is a direct bandwidth saving; for archiving it is storage; for a file you need under an upload limit it can be the difference between fitting and not.

AV1 goes further still, roughly 30% beyond VP9, but encodes slowly enough that it is impractical for one-off conversions on an ordinary machine.

Choosing in practice

Sending a video to someone, uploading to a platform, or unsure who will watch it: H.264 in an MP4 container with AAC audio. It will play.

Publishing on the web where you control the page and can offer alternatives: VP9 in WebM, with an H.264 MP4 fallback.

Archiving your own footage where storage matters and you control the playback software: H.265 or AV1.

Frequently Asked Questions

Is H.265 always better than H.264?

Better compression, yes. Better choice, often no. A smaller file that will not play on the recipient's device, or that drains their battery decoding in software, is not an improvement. Compatibility usually matters more than the size saving.

Why is H.265 not supported everywhere in browsers?

Licensing. H.265 carries patent claims from several pools with complicated terms, which several browser vendors declined to take on. VP9 and AV1 were developed to be royalty-free specifically to avoid that problem, which is why browser support for them is broader.

Which codec should I use for WhatsApp or email?

H.264 in an MP4. Both will re-encode the file anyway, and starting from a universally supported codec avoids a failed upload or a video that will not play for the recipient.

Does changing codec reduce quality?

Re-encoding from one lossy codec to another always loses a little, because the encoder is compressing an already-compressed image. Convert from the highest-quality source you have rather than from a file that has already been through several rounds.

Try it yourself

Terms used here

Related comparisons

  • MP4 vs WebMMP4 for compatibility. WebM for the open web, with an MP4 fallback.