How to convert HEIC to JPG on Linux
Most distributions leave HEVC support out of the default install for licensing reasons. Adding it takes one command, and then everything works properly.
Why HEIC support is not there by default
HEVC is patent-encumbered, and distributions that ship binaries in some jurisdictions avoid including patented codecs in their default repositories. Fedora is the strictest about this, which is why RPM Fusion exists. Ubuntu and Debian are more relaxed but still leave the tools out of a minimal install.
Nothing about this is technically difficult — it is entirely a licensing decision, and installing the packages yourself resolves it.
- Install libheif and its tools
On Debian or Ubuntu:
sudo apt install libheif-examples libheif1
On Fedora:sudo dnf install libheif libheif-tools
On Arch:sudo pacman -S libheif
Fedora users may need RPM Fusion enabled first for the HEVC decoder. - Convert single files
heif-convert photo.heic photo.jpg— that is the whole command. Add-q 92to set JPEG quality. The extension of the output filename determines the format, sophoto.pngwrites PNG instead. - Convert a whole directory
for f in *.heic; do heif-convert -q 92 "$f" "${f%.heic}.jpg"; doneOr with ImageMagick, once its HEIC delegate is present:
mogrify -format jpg -quality 92 *.heic - Get thumbnails in your file manager
Install
heif-thumbnailer(part of libheif-examples on Debian) andheif-gdk-pixbuf, which is what GNOME Files, Nautilus, Dolphin and Thunar all call to build previews. Any blank icons generated beforehand are cached and need clearing afterwards, which this page covers for every desktop.
Opening HEIC in GIMP
GIMP 2.10 and later reads HEIC when libheif is present, and GIMP 3 handles it more smoothly still. If File → Open refuses your file, the libheif packages are missing rather than GIMP being at fault. Once installed, GIMP opens HEIC directly and exports to any format through File → Export As.
For scripted conversion, GIMP's batch mode works but is heavy. heif-convert and
ImageMagick are both far quicker for pure format changes.
Preserving quality and metadata
| Goal | Command |
|---|---|
| High-quality JPG | heif-convert -q 95 in.heic out.jpg |
| Lossless PNG | heif-convert in.heic out.png |
| Resize while converting | magick in.heic -resize 2000x2000 -quality 92 out.jpg |
| Copy EXIF across | exiftool -TagsFromFile in.heic out.jpg |
| Strip all metadata | exiftool -all= out.jpg |
That fourth command is worth knowing. Most converters drop EXIF, and running exiftool afterwards restores the capture date, camera model and settings from the original file.
On a locked-down machine. If you cannot install packages — a managed workstation, a live USB, a shared system — the browser converter works with nothing installed and no upload, since it carries its own WebAssembly decoder.
Common questions
- How do I install HEIC support on Ubuntu?
- Run sudo apt install libheif-examples libheif1. That provides the heif-convert command line tool and the library that other applications, including GIMP and ImageMagick, use to read the format.
- What is the command to convert HEIC to JPG on Linux?
- heif-convert photo.heic photo.jpg, with an optional -q flag to set quality. ImageMagick's mogrify with the format option handles whole directories in one command.
- Why does GIMP refuse to open my HEIC file?
- GIMP relies on libheif rather than implementing HEIF itself. If the library is not installed, the file type simply is not recognised. Installing libheif resolves it without reconfiguring GIMP.
- How do I get HEIC thumbnails in my file manager?
- Install heif-thumbnailer and heif-gdk-pixbuf, clear the thumbnail cache in ~/.cache/thumbnails, and restart the file manager. Previews are then generated the same way as for any other image format.