Start with the input and output you need
For a reliable converter, decide what files you accept, how you handle orientation and metadata, what JPG settings you use, and how errors are reported before choosing a library or CLI tool.
Define what your converter should do
Decide whether you accept both .heic and .heif, whether multi-image files matter, what JPG quality you want, and whether metadata should be copied, removed, or handled separately.
Also decide what happens when one file fails. Batch code should report the failed item without making successful files look like failures.
Check the library or tool before you build around it
- Confirm that it can decode the HEIC/HEIF files you expect to receive.
- Check orientation and color handling with real camera files.
- Check how it exposes multiple images or frames if those matter to your application.
- Check metadata behavior instead of assuming EXIF will be copied automatically.
- Pin the version you test so a later dependency change does not silently change output.
For decoding support, see the HEIC codec guide. For browser viewing and upload issues, see HEIC in Chrome.
Test with files that expose common problems
- Portrait and landscape photos for orientation.
- Files with EXIF or other metadata when metadata matters.
- Large images and batches for memory and throughput behavior.
- A deliberately invalid or unsupported file for error handling.
- Multi-image HEIC/HEIF files if your application claims to support them.
Use the HEIC sample files to check how your viewer or converter handles different inputs.
A simple conversion pipeline
A typical flow is: read the file, decode the HEIC image, apply orientation correctly, convert the pixel data to the target color format, encode JPG, and write the output.
For batches, keep file-level status so one bad input does not hide the results from the rest of the job.
Python convert HEIC to JPG
In Python, choose a maintained HEIF/HEIC decoder that works in your deployment environment, decode the image, and save the result with a JPEG encoder. Check the dependency documentation for supported platforms and licensing.
The same pattern applies in other languages: decode with a HEIC-capable library, normalize the image as needed, then encode JPEG with explicit settings.
Command line convert HEIC to JPG
For CLI conversion, use a HEIC-capable image tool available for your operating system. Test the exact tool and version you plan to deploy before building automation around its command syntax.
In scripts, quote paths, choose output names explicitly, and check the exit status. Do not treat the presence of a .jpg file as proof that every input converted correctly.
Common failure points
If decoding fails, first confirm that the file is actually HEIC/HEIF and that the decoder was built with the required image support. If colors or orientation are wrong, inspect the decode and transform steps before changing JPEG quality.
If metadata disappears, check whether your chosen decoder and encoder expose a way to carry it across. Pixel conversion and metadata copying are separate concerns.
Platform-specific help
Keep the implementation predictable
For command-line automation, pin the tool version, make output settings explicit, and test representative files before deployment.
When you need a JPEG copy, convert HEIC to JPG.
Related HEIC guides and tools
Choose the guide or tool that matches what you want to do next.
Open HEIC in Preview or convert it to JPG on a Mac.
HEIC to JPG converterConvert a HEIC or HEIF photo to JPG for apps and sites that do not accept HEIC.
HEIC on WindowsOpen HEIC on Windows 11 or convert it when another Windows app needs JPG.
What is a HEIC file?Learn what HEIC is, why phones use it, and when you may want another format.
HEIC codec supportLearn what a HEIC codec does and why some apps cannot open HEIC files.
HEIC metadataInspect EXIF and other image information stored with a HEIC file.
More related HEIC guides and tools
More HEIC guides for related formats, platforms, and tasks.
Frequently asked questions
Short answers to common questions.
Decode the HEIC image, apply orientation and color handling as needed, encode JPEG with explicit settings, and write the output.
Not necessarily. Metadata handling depends on the libraries and code path you use, so test it explicitly.
Test orientation, color, metadata, large files, error handling, and multi-image files if your application supports them.
Use Python when conversion is part of application logic. A CLI can be simpler for scripts and one-off automation when a suitable tool is available for the target system.