Parse JSON files from Google Keep export and convert them to Markdown files or PDFs. Attachments and images are preserved.
You can download your Google Keep backup file by visiting:
https://takeout.google.com/takeout/custom/keep
You can export data to a .zip or .tgz archive which has the following structure:
└── Takeout
├── Keep
│ ├── JSON & HTML files, and attachments
└── archive_browser.html
-
Copy the
Takeoutfolder into the root of this repo. -
Set up a virtual environment (recommended):
# Create a virtual environment python -m venv venv # Activate the virtual environment # On Windows: venv\Scripts\activate # On macOS/Linux: source venv/bin/activate
-
Install required packages:
pip install reportlab
Run the script with your preferred export format:
# Export to Markdown only (default)
python google_keep_extractor.py
# Export to PDF only
python google_keep_extractor.py --format pdf
# Export to both Markdown and PDF
python google_keep_extractor.py --format bothPython 3.8 or later is required.
After running the script, files are created in the export directory with the following structure:
export/
├── markdown/
│ ├── attachments/
│ │ └── ... (your attachments)
│ └── ... (your markdown files)
└── pdf/
└── ... (your PDF files)
- Exports to Markdown and/or PDF formats
- Preserves timestamps in filenames
- Includes attachments
- Preserves Keep's Labels
- Maintains checklist formatting
- Handles pinned and archived notes
- Cross-platform compatible (Windows, macOS, Linux)
- Safely handles special characters in filenames
- Python 3.8+
- ReportLab (for PDF export)
- Trashed notes are skipped during export
- Special characters in note titles are sanitized for safe filenames
- Pinned and archived notes are marked in the title
- Very long filenames are automatically truncated to avoid filesystem issues
- Progress information is displayed during export
If you encounter any issues:
- Make sure the
Takeoutfolder is in the same directory as the script - Check that you have the required Python version (3.8+)
- Ensure ReportLab is installed correctly
- For PDF export issues, make sure your attachments are accessible