A collection of Python scripts to help you migrate your Google Photos library to iCloud while preserving metadata (dates, locations, descriptions).
This tool helps you convert Google Photos media files to formats compatible with iCloud Photos while preserving important metadata like:
- Original capture date/time
- GPS location data
- Photo descriptions
Google Photos exports use a "sidecar" pattern with separate JSON files for metadata. This tool reads those JSON files and embeds the metadata directly into the media files so iCloud Photos can properly display and organize them.
- ~98% success rate for media files with corresponding JSON metadata
- Failed conversions are usually due to missing JSON metadata files
- Manual metadata adjustment can be done through the iOS Photos app for any problematic files
- Python 3 - Download from python.org
- Required software tools:
- Download here
- Install the .exe files and extract the .zip folders
- Add the bin folders to your system PATH environment variable, for these softwares.
- Clone/download this repository
- Install Python dependencies:
pip install -r requirements.txt
- Go to Google Takeout
- Deselect all services except Google Photos
- Request the download and wait for Google to prepare your archive
- Download and extract all archive files to a folder
- Important: Copy (don't move) your extracted Google Photos folder into this tool's directory
- Keep your original Google Photos export safe as a backup
Note: Follow below folder structure to avoid confusion in the commands later. Create them manually.
- "output" folder -> going to contain our final processed media files, we will copy all the folders/files (except report.txt) from here to icloud/Photos folder.
- "Photos" folder -> going to contain all the extracted images from google photo zip dumps.
- "software" folder -> after downloading all the softwares, paste it here and extract/install here.
Run the following scripts in order:
python 1.count_extensions.py <photos_folder>
Example:
python 1.count_extensions.py Photos
This shows what types of files are in your Google Photos export. Keep this information for reference.
python 2.delete_redundant_mp4.py <photos_folder>
Example:
python 2.delete_redundant_mp4.py Photos
This removes duplicate MP4 files created by Google Photos' "live photo" feature.
python 3.final_script.py <photos_folder> [output_folder]
Example:
python 3.final_script.py Photos Output
This is the main processing script that:
- Converts HEIC files to JPG
- Converts MOV/AVI files to MP4
- Embeds metadata from JSON files into the media files
- Preserves the original folder structure
- Generates a report of the processing results
Note: This process can take several hours depending on how many files you have.
python 4.failed_mpv_optional.py
Only run this if the main script reported failed conversions. By default, it processes files listed in output/report.txt
.
- Install the iCloud for Windows app (from Microsoft Store or Apple's website)
- Sign in with your Apple ID
- Open File Explorer and navigate to your iCloud Photos folder
- Copy all subfolders and files from your output folder to the iCloud Photos folder
- Allow sufficient time for the upload to complete (can take several days for large libraries)
If you want to delete your Google Photos content after migration:
- Go to the Google Photos website
- Select the first photo on the page
- Press Page Down several times to load more photos
- Hold Shift and click the last photo on the page to select all photos between the first and last
- Click the Delete icon
- Repeat as needed (each batch can select ~2000 photos)
Important: Wait until your iCloud Photos library is fully uploaded and verified before deleting your Google Photos.
If you encounter any problems, please open an issue in this repository.