How to export Notion to Markdown without losing links
Export Notion to Markdown and CSV, then import the zip into Loam with a dry run first. Exact steps, known limits and what to check so your links survive.
To export Notion to Markdown, open the page, click •••, choose Export, pick Markdown & CSV, turn on Include subpages and save the zip. The export is a snapshot, and Notion adds ids to the file names and links, so the cleanup afterwards is most of the work. Loam is our app, a free and open source Markdown notebook for Mac, and its Notion importer removes the ids from names and links, with a dry run first.
How do you export a Notion page to Markdown?
Use the Notion desktop app. These are the steps for one page and the pages nested inside it.
- Open the menu. Open the page, click the
•••icon at the top right and choose Export. - Pick the format. Choose Markdown & CSV in the format dropdown.
- Include subpages. Turn on Include subpages to get the nested pages as separate files.
- Download. Click Export. Notion gives you a zip file with your CSV and Markdown files, and you choose where to save it.
A page that is not a database exports as one Markdown file. A full-page database exports as a CSV file, with a Markdown file for each subpage. On mobile, tap •••, scroll to Export, choose Markdown & CSV from the format menu and tap Export. Notion also emails you a download link.
How do you export a whole Notion workspace?
Open Settings in the sidebar, select General under Workspace, and choose Export all workspace content. Notion emails you a download link, and the link expires after 7 days. A large workspace can take up to 30 hours to prepare. This option exists on desktop and web only. If Notion asks for a format, choose Markdown & CSV.
Admins can turn export off for a workspace or a teamspace, so the option can be missing for you. In that case ask an admin to run the export or to enable it.
What does a Notion Markdown export leave out?
A Markdown export is a copy of your pages, and Notion says you cannot recreate a workspace at once by uploading the export back. Databases export as CSV files, and callouts export as HTML. These are the limits to plan for.
- Databases become CSV. A full-page database exports as a CSV file, with a Markdown file for each subpage. You can export only the current view or the default view, and form views cannot be exported, so export the Table view instead.
- Callouts become HTML. Notion exports callout blocks as HTML, because Markdown has no equivalent.
- Some pages are missing. Pages the exporter cannot access, such as other people's private pages, are left out, and teamspace settings can exclude more.
- File names carry ids. Notion's help page does not mention it, but exported pages come with a long hex id after the title, such as
My Page 8c14a3b7b53f4b908b0f8db1eaa2fb87. The id keeps the pages linked to each other, and it makes names messy and paths long. - Comments are unclear. Notion says an HTML export can include comments. Its page does not say whether a Markdown export does, so look for them in a sample page.
- Long paths break zips on Windows. Windows cannot open zip files with paths over 260 characters. Turn off Create folders for subpages, or extract with 7-Zip.
Sources: Notion Help Center: export your content ↗ · Example of an id in an exported file name (notion-export-cleaning-filenames) ↗
How do you keep links between pages working?
Export everything that links together in one go. Links between exported pages point at file names, and the ids in those names are why the importer has to fix names and links together. A page exported alone can link to pages that are not in the zip, and those links then have nothing to open.
The simplest route is to export the top-level page with Include subpages turned on, or the whole workspace, and to import that single zip in one run. The Loam importer rewrites names and links together, so a link and the page it points at keep matching after the ids are gone.
How do you import a Notion export into Loam?
Loam has an importer for Notion exports. It reads the zip or the unzipped folder, never changes it, and never overwrites a file that already exists. It runs from the loam command line. First install Loam, then open an empty folder as a vault, as shown in Your first vault.
Run the dry run first and read the report before you import for real. A dry run writes nothing:
loam --vault ~/Notes import.notion source=~/Downloads/Export.zip dry-run=trueThe report is JSON, with converted, copied, collections, skipped and warnings. skipped lists files that already exist, and warnings lists the links and files that need a look. When it looks right, run the same command without dry-run:
loam --vault ~/Notes import.notion source=~/Downloads/Export.zipBy default the notes go into a folder under Imported/, named after the app. Add into=<folder> to choose another folder. The source can be the .zip or the folder you unzipped. The import page inside the app is documented for Obsidian vaults, so a Notion import runs from the command line.
What does the Notion importer convert?
| In the Notion export | In your Loam vault |
|---|---|
| Ids in file names and links | Removed from the names and from the links between pages |
| Pages and subpages | Plain Markdown notes |
| Page properties | YAML frontmatter at the top of the note |
| Databases | Collections: a .base file that shows notes as a table, a board or a gallery |
| Callouts (HTML) | Not listed in the importer docs, so check them by hand |
From the Loam docs: Import notes. The docs do not list callouts.
Frontmatter is the block between two --- lines at the top of a note, where each property is a key: value line. A collection reads those properties, as described in Collections. The .base format is open, and Obsidian reads it too, so a Notion database ends up as a file that more than one app can open.
What should you check after the import?
- Read the warnings. Each entry in
warningsis a link or a file that needs a look. - Test the links. Loam tracks standard Markdown links, such as
[Plan](Projects/Plan.md), for backlinks and renames. Pick a page that links to others and list its backlinks withloam --vault ~/Notes notes.backlinks path=<note>. - Open one collection. Compare the rows and the property names with the CSV that Notion exported.
- Look at images and files. Open a few pages that had pictures or attachments.
- Look at callouts. Notion exported them as HTML, so check how they read.
Keep the Notion zip until you have finished checking. The import only reads it, so if something looks wrong you can run the dry run again, or import into another folder with into=<folder>. A note you trash in Loam goes to .trash/ and stays there for 30 days by default, so a mistake while you tidy up is recoverable.
Links need the most care. Only standard Markdown links feed backlinks and renames in Loam. Wikilinks such as [[Plan]] are styled in the editor but do not count. If a page links to a note that does not exist, the report lists it as a warning.
Once the checks pass, move the notes out of Imported/ into your own folders. Moving or renaming a note with notes.rename rewrites the links that point to it, so links to the note keep working:
loam --vault ~/Notes notes.rename from=Imported/Roadmap.md to=Projects/Roadmap.mdCollections show notes as a table, a board or a gallery, based on their properties. They are not relational databases with rollups and formulas. If your work depends on those, Notion stays the better tool for that part.
When is Notion still the better choice?
Notion is the better tool for a team in one shared workspace, with comments, permissions and relational databases. Loam is for one person: it runs on macOS 26 or later, on Apple silicon, it has no iPhone or Android app, and you share a vault through Git. Some people keep Notion for team pages and Loam for personal notes, since an export lets you move pages to files whenever you want.
To weigh the two apps, read Loam vs Notion, Best Notion alternatives and Notion vs Obsidian. To read the files you just exported, the Markdown cheat sheet explains every syntax in them.
Try Loam
Loam is free and open source, and one command installs it: see Install Loam. Export a single page from Notion, run the dry run on it and read the report. When you like the result, repeat it with the whole workspace. For a side-by-side view of both apps, open the Notion comparison or browse all comparisons.