Skip to the tool workspace
Browser 106
How-to 4 min read

How to convert between image formats

Which image format to convert to and why — JPEG, PNG, WebP, AVIF, HEIC — plus the one-line commands and what silently breaks when you pick wrong.

taskchange an image's format nativesips / ImageMagick approach Browser first

Format conversion is mostly a question of what the file is for. Get that right and the conversion itself is one command.

Pick the destination first

Format Use it for Watch out
JPEG Photographs, universal compatibility No transparency; every save loses a little
PNG Screenshots, logos, anything with transparency or sharp edges Enormous for photographs
WebP Almost everything on the web Some desktop software still cannot open it
AVIF Photos where size matters most Support is broad, not universal; slow to encode
HEIC What your iPhone produced Barely readable outside Apple
SVG Logos and icons that must scale Vector only — a photo cannot become one
TIFF Print and archival Very large

Two rules cover most mistakes. Photographs do not belong in PNG — it is lossless, so it stores JPEG artefacts as though they were detail and the file balloons. Screenshots of text do not belong in JPEG — lossy compression smears the edges of letters into grey mush.

The direct waysips (macOS) · ImageMagickmacOS · Linux · Windows

For one file, or a folder of the same kind of file, a command is faster than any interface. macOS, no install:

sips -s format jpeg photo.heic --out photo.jpg

ImageMagick, anywhere — the format is inferred from the extension:

magick photo.png photo.webp

The conversions people actually need

HEIC to JPEG

The most common one. iPhones shoot HEIC by default and much of the world cannot open it.

sips -s format jpeg IMG_0001.heic --out IMG_0001.jpg

On Windows or Linux, HEIC support depends on codecs that may not be installed — this is the case where a browser tool that carries its own decoder is genuinely less trouble than fixing the system.

Anything to WebP

The single best change for images on a website:

magick photo.jpg -quality 82 photo.webp

Quality 82 is a good default; WebP holds up better at a given quality number than JPEG does.

PNG to JPEG, and the transparency trap

Transparency becomes black

JPEG has no alpha channel. Converting a transparent PNG to JPEG replaces the transparent areas with something — often black — and the result looks broken. Flatten onto a known background first:

magick logo.png -background white -flatten logo.jpg

Quality, and when it does not apply

Lossy formats (JPEG, WebP, AVIF) take a quality number. Lossless ones (PNG, TIFF, BMP) ignore it — there is no trade-off to make.

  • 90–100 — archival. Large files, no visible benefit over 85 for most images
  • 80–90 — the working range for anything published
  • 60–80 — thumbnails and previews
  • Below 60 — visible blocking on any photograph
Converting between lossy formats costs quality

JPEG to WebP decodes the JPEG and re-compresses it, so the new file carries the old damage plus a little more. It is usually worth it for the size saving, but convert from the original whenever you still have it.

Converting a folder properly
  1. Work on a copy. Format conversion is not reversible in any useful sense.
  2. Check the batch is actually uniform — one PNG logo hiding among photographs will come out wrong if you apply photo settings to everything.
  3. Convert, then spot-check the most detailed image and anything with transparency.
  4. Keep the originals until you are sure.

Why do this in a browser at all

Three honest reasons, and none of them is "it is better than ImageMagick":

  • The format is exotic. PSD, XCF, JXL, camera RAW. Installing a toolchain for one file you were sent is disproportionate.
  • The images are private. An upload-based converter puts them on a server. This one decodes and re-encodes in the tab.
  • You want to see what you are getting. A batch of mixed images benefits from eyes on each result, which a command line does not give you.
Vragen
Which format should I use for photos on the web?

WebP. It is 25–35% smaller than JPEG at the same visual quality and every current browser reads it. Keep a JPEG fallback only if you must support something genuinely ancient.

Why did my PNG get huge when I converted from JPEG?

PNG is lossless, so it faithfully stores the JPEG's compression artefacts as if they were detail. Converting a photo to PNG almost always makes it bigger and never makes it better.

How do I open a HEIC file from my iPhone?

Convert it to JPEG. macOS does it with sips; anywhere else, use a converter. HEIC is efficient but poorly supported outside Apple's ecosystem.

Does converting lose quality?

Lossy to lossy does — JPEG to WebP decodes and re-compresses. Lossless to lossless (PNG to TIFF) does not. Lossy to lossless keeps the damage already done without adding more.

What is AVIF and should I use it?

A newer format, smaller again than WebP, with broad but not universal support. Worth it when size matters most and you can serve a fallback.

Tools in this guide Everything runs on your device

All guides Updated 9 sep. 2026

/
106 items
Runs locally·No upload·Files stay on this device
Out0 B
Ready—