Reading time ~12–15 min
- Two rules that explain most file behavior
- Images — JPG, PNG, WebP, AVIF, GIF/APNG, SVG, TIFF/RAW
- Audio — MP3, AAC/M4A, Opus, WAV/AIFF, FLAC/ALAC
- Video — MP4/H.264, WebM/VP9/AV1, MOV/ProRes, MKV
- Documents — PDF, DOCX, HTML/Markdown, EPUB
- Data — CSV, JSON, XLSX, XML/YAML, Parquet/Arrow
- Archives — ZIP, 7z, TAR.GZ/XZ
- Quick decision trees
- Troubleshooting
- Glossary
The two rules that explain most file behavior
Two forces shape how files behave: lossy vs. lossless compression, and whether a format supports transparency (alpha). JPEG is lossy and has no alpha, which is why “transparent JPGs” show a white box or halo. PNG/WebP/AVIF support alpha and are ideal for logos and UI with clean edges.
Images
- Photos (no transparency): JPG, WebP, AVIF
- Graphics/UI, needs crisp edges or transparency: PNG, SVG, WebP/AVIF
- Animation: animated WebP or APNG (GIF only for simple/retro)
- JPG has no transparency → white boxes/halos on cut-outs.
- PNG is lossless—great for logos, big for photos.
- AVIF is tiny but slower to encode; keep a fallback if compatibility matters.
JPEG / JPG
Small, universal for photos; no alpha; artifacts if compressed hard.
PNG
Lossless, sharp, true transparency; large for photos.
WebP
Modern, smaller than JPG/PNG; supports transparency & animation.
AVIF
Often the smallest at high quality; supports alpha; encoding slower.
GIF/APNG/Animated WebP
Prefer APNG/animated WebP for quality and size; use GIF for retro/simple loops.
SVG
Vector; scales perfectly; ideal for logos/icons.
TIFF/RAW
Masters for editing and archive; not for web delivery.
Audio
MP3 (plays everywhere), AAC/M4A (more efficient), Opus (great at low bitrates), WAV/AIFF (editing), FLAC/ALAC (lossless archive).
Video
MP4 (H.264 + AAC) for universal playback; WebM (VP9/AV1 + Opus) for smaller web files; MOV/ProRes for editing.
Documents
DOCX for editing/collab; PDF to freeze layout; HTML/Markdown to publish; EPUB for ebooks.
Data
CSV for simple tables, JSON for APIs/configs, XLSX for spreadsheets, Parquet/Arrow for analytics.
Archives
ZIP is default; 7z for max compression; TAR.GZ/XZ for Unix workflows.
Quick decision trees
Images
- Need transparency? → PNG/SVG/WebP/AVIF
- Photo only? → JPG or WebP/AVIF
- Animation? → Animated WebP/APNG
Audio
- Share anywhere? → MP3
- For video? → AAC
- Edit/archive? → WAV/FLAC
Video
- Universal? → MP4 (H.264 + AAC)
- Smaller web? → WebM (VP9/AV1)
- Editing? → MOV/ProRes
Documents
- Editable? → DOCX
- Final/share/print? → PDF
Troubleshooting
- Logo has a white box: Export PNG/WebP/AVIF with transparency.
- Animated GIF is huge: Use animated WebP/APNG.
- Screenshot is blurry: Save as PNG (JPG blurs UI text).
- Colors shift in print: Convert to the print profile; proof first.
- CSV lost leading zeros: Quote fields or use JSON/XLSX.