- Swift 85%
- C 13.3%
- Makefile 1.7%
|
Some checks are pending
CI / Build (push) Waiting to run
DOCX/ODT outputs (#34): - ZIP entries now carry valid MS-DOS timestamps; epoch zero made Word reject the file with "Word experienced an error trying to open". - DOCX adds docProps/core.xml and docProps/app.xml and references them from [Content_Types].xml and _rels/.rels. Newer Word requires both. - DOCX styles.xml gets a Normal style + docDefaults; without them the file opened with the "file is corrupt, recover?" prompt. - HTMLToODFParser rewrites stray text and <br> inside <office:text> into proper <text:p> paragraphs via an inParagraph state machine. LibreOffice rejected the prior bare-text layout as schema-invalid. - <img alt="image"> (Apple Notes default alt) renders as [Image] rather than the awkward [Image: image]. Image embedding (DOCX/ODT parity with HTML/PDF): - New EmbeddedImageHelper.swift extracts base64 <img> data URIs from the HTML body, decodes the bytes, parses JPEG/PNG/GIF dimensions, and replaces each tag with an <imgref> marker. - DOCX packages bytes at word/media/imageN.ext, adds image relationships and Default content-type entries, and emits inline <w:drawing> runs with sensible EMU sizing (capped at 6in wide). - ODT packages bytes at Pictures/imageN.ext, declares them in META-INF/manifest.xml, and emits <draw:frame><draw:image> inside text:p. content.xml gains the draw/svg/xlink namespaces. - ExportViewModel and CLIExportEngine force embedImagesInline=true when producing DOCX/ODT so the base64 path is always available. Hyperlinks (DOCX/ODT parity with HTML/PDF): - HyperlinkExtractor pulls <a href="..."> ... </a> pairs into <hrefopen>/<hrefclose> markers with rId tags. - DOCX emits <w:hyperlink r:id="..."> with External relationships in word/_rels/document.xml.rels; runs inside the link get blue + underline styling. - ODT emits <text:a xlink:type="simple" xlink:href="..."> directly in content.xml. Heading escape: - Apple Notes wraps attachment cards in <h1>, which made the card render in 24pt bold. A <div> inside a heading now closes the heading paragraph so the card renders in body style. UI (#35): - Main window now sizes to its content. The hardcoded 525.0/570.0 pt frame on AppleNotesExporterView was clipping the footer on macOS 26.4. Combined with the existing .windowResizability(.contentSize) the window stays non-resizable and fits the layout. Tests: - New DOCXRoundtripTests covers ZIP timestamps, docProps presence, Normal style + docDefaults, ODT bare-text wrapping, ODT lists, image embedding for both formats, hyperlink emission for both formats, heading escape, and the [Image] alt cosmetic. 10 new tests, all passing alongside the existing 35 ExportSupportTests. Project: - Added EmbeddedImageHelper.swift to App, CLI, and MCP targets. - Added DOCXRoundtripTests.swift to the tests target. Signed-off-by: Konstantin Zaremski <konstantin.zaremski@gmail.com> |
||
|---|---|---|
| .github | ||
| Apple Notes Exporter | ||
| icon | ||
| screenshots | ||
| .gitignore | ||
| CONTRIBUTING.md | ||
| CONTRIBUTORS.txt | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
Apple Notes Exporter (apple-notes-exporter)
MacOS app written in Swift that bulk exports Apple Notes (including iCloud Notes) to a multitude of formats preserving note folder structure.
Built by Konstantin Zaremski
Purpose & Rationale
Many choose to do all of their note taking and planning through Apple Notes because of the simplicity and convenience that it offers. Unfortunately, there is no good workflow or mechanism built into Apple Notes that allows you to export all your notes or a group of your notes at once. This app provides a fast, efficient way to export your entire notes library while maintaining the folder hierarchy and preserving formatting.
What's New in v2.0
- Command-line interface (
notes-export) with subcommands for listing accounts, folders, and notes, plus full export support. JSON output for scripting. - Model Context Protocol server (
notes-export-mcp) exposes the exporter as MCP tools for AI assistants like Claude Desktop. - Apple Shortcuts support via App Intents: Export Notes, List Accounts, and List Folders actions.
- 12 new export formats in addition to the original 6 (18 total).
- New app icon designed by Sascha Schneppmüller.
- Gallery attachment fixes for On My Mac notes, handwritten note title resolution on macOS 15+, and correct file extensions for attachments without a database filename.
Export Formats
Rich / document formats
- HTML - Native format returned by the Apple Notes database. Images included inline via base64 embed syntax. Configurable: font family, font size, margins.
- PDF - Generated from HTML, preserves all formatting and images. Configurable: font family, font size, margins, page size (Letter, A4, A5, Legal, Tabloid).
- TEX - LaTeX format for typesetting. Notes can be compiled individually or combined. Configurable: custom template with placeholders for title, dates, author, and content.
- MD - Markdown format. Useful for moving to other Markdown-based apps like Obsidian. Images included inline via base64 embed syntax.
- RTF - Rich text format. Opens in WordPad (Windows) or TextEdit (macOS). Configurable: font family and font size.
- TXT - Plain text, no formatting or images.
- DOCX - Microsoft Word format for Office and Google Docs.
- ODT - OpenDocument text for LibreOffice and other open-source editors.
- EPUB - E-book format for Kindle, Apple Books, and other e-readers.
Structured / data formats
- JSON - Structured note data for APIs and data processing.
- JSONL - One JSON object per line; ideal for LLM and RAG pipelines.
- XML - Structured note data in XML for interoperability.
- CSV - Flat table format for spreadsheets and databases.
Outline / documentation formats
- OPML - Outline format for RSS readers and outliners.
- ORG - Emacs Org-mode format for notes and task management.
- RST - reStructuredText for Sphinx and Python documentation.
- ADOC - AsciiDoc format for technical documentation.
Interchange formats
- ENEX - Evernote export format for import into Evernote, Joplin, and similar apps.
Attachments are always saved in a folder corresponding to the name/title of the note that they are associated with.
Scripting & Automation
In addition to the GUI app, v2.0 ships three ways to drive the exporter from other tools:
Command-line interface (notes-export)
notes-export list-accounts
notes-export list-folders --account iCloud
notes-export list-notes --folder Work
notes-export export --output ~/Desktop/notes --format markdown --account iCloud
Built with Swift ArgumentParser. JSON output on stdout for piping into other tools, progress and errors on stderr. Supports filtering by account, folder, title, and modification date, plus incremental sync.
Apple Shortcuts (App Intents)
Three actions are available in the Shortcuts app under "Apple Notes Exporter":
- Export Notes - Export selected notes to a chosen format and folder.
- List Accounts - Returns a list of available note accounts.
- List Folders - Returns a list of folders, optionally filtered by account.
Run them from Siri, automations, or any Shortcuts flow.
Model Context Protocol server (notes-export-mcp)
An MCP server exposing five tools (list_accounts, list_folders, list_notes, get_note, export_note) so AI assistants like Claude Desktop can read and export your notes directly. See PR #30 for details.
All three require Full Disk Access (same as the GUI app) to read the local Notes database.
Incremental Sync
Re-exporting an entire Notes library on every backup is wasteful when only a handful of notes have changed. Incremental sync tracks which notes have already been exported and, on subsequent runs, writes only notes that are new or have been modified since the last export.
On first run with --incremental, the CLI writes a AppleNotesExportSyncWatermark.json manifest to the output directory recording each note's ID, modification date, and exported path. On subsequent runs against the same directory, notes whose modification date has not changed are skipped, and existing files are left in place.
# First run: full export
notes-export export --output ~/backups/notes --format markdown --incremental
# Second run: only new/changed notes get re-written
notes-export export --output ~/backups/notes --format markdown --incremental
# Force a full re-export, wiping the manifest
notes-export export --output ~/backups/notes --format markdown --incremental --reset-sync
# Inspect manifest state without touching the database
notes-export sync-status --output ~/backups/notes
The GUI also exposes incremental sync as a toggle in the export options. Incremental sync and concatenation are mutually exclusive (see below); incremental requires per-note files.
Concatenation
For quick dumps of many notes into one file, the --concatenate flag joins every exported note into a single Exported Notes.<ext> in the output directory, with format-appropriate separators between notes (page breaks in HTML/TEX, --- rules in Markdown, row of equals signs in TXT).
notes-export export --output ~/Desktop --format markdown --concatenate
# Produces: ~/Desktop/Exported Notes.md
Concatenation is only supported for Markdown and plain text in the GUI; the CLI additionally supports HTML, RTF, and TeX. Concatenation is not compatible with --incremental (it would rewrite the whole concatenated file every time regardless) and is not available for the packaged binary formats (DOCX, ODT, EPUB, PDF).
Compatibility & System Requirements
- MacOS Big Sur 11.0 or higher
- Some of the features used are not available in earlier MacOS versions.
- Backported from Ventura to Big Sur; earlier versions would require UI rewrites.
- Intel or Apple Silicon Mac
- 4GB RAM minimum
- Optimized database-driven approach uses approximately 200MB of RAM regardless of Notes library size
- Concurrent export processing for maximum performance
- Disk Space
- 20MB to accommodate the app itself
- Additional space for your exported notes and their attachments
Limitations
As of version 1.0, Apple Notes Exporter no longer supports exporting from accounts other than iCloud accounts and the On My Mac account. This includes notes stored in Gmail, Yahoo, Outlook, and other email-based accounts.
Workaround for Email Account Notes
If you have notes in Gmail, Yahoo, Outlook, or other email accounts that you want to export:
- Open the Apple Notes app
- Select the notes you want to export from your email account
- Drag and drop them into a folder under "On My Mac" or one of your iCloud accounts
- Once moved, these notes will be accessible to Apple Notes Exporter and can be included in your export
This limitation is due to the database-driven approach used in version 1.0, which queries the local Notes database directly. Email-based note accounts store their data differently and are not included in the same database structure that iCloud and On My Mac accounts use.
Additional Screenshots
Installation
The latest download is available from the Github "Releases" tab.
Make sure that you have "App Store and Identified Developers" set as your app install sources in the "Privacy & Security" section of System Settings in MacOS.
As of Version 0.4 Build 5, we are distributing a notarized executable. For older versions, go to the "Privacy & Security" pane of System Settings and click "Open Anyway" under the "Security" section towards the bottom of the pane. See Apple's article https://support.apple.com/en-us/HT202491 if you need more help or a better explanation on how to make an exception for the app to run.
Acknowledgements
This project benefited from the groundwork and research done by threeplanetssoftware on Apple Notes protobuf formats and database parsing in their apple_cloud_notes_parser project. Their work was instrumental in understanding the Apple Notes database structure, enabling the transition from AppleScript-based export to the more efficient database-driven approach used in version 1.0.
Thanks to everyone who has contributed to this project:
- Christian Hovenbitzer (@AnotherCoolDude) - CLI and MCP server targets for v2.0
- Sascha Schneppmüller (@Schneppi) - Redesigned app icon for v2.0
- Sergey Nikolsky (@nikolsky2) - Fixed a crash when AppleScript returned empty notes
See CONTRIBUTORS.txt for the full list.
![]() @kzaremski |
![]() @AnotherCoolDude |
![]() @Schneppi |
![]() @nikolsky2 |
License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Apple Notes Exporter
Copyright (C) 2026 Konstantin Zaremski
Licensed under the GNU General Public License v3.0










