How to export Notion to Markdown and keep it readable
Filed under Guide
By Gerald · 24 August 2026
Notion's export button works. That is not the problem. The problem is what it hands you: a folder tree where every file and folder carries a 32-character hex code stapled to its name, internal links that only resolve because they point at those exact ugly names, and every database flattened into a CSV that quietly drops relations and custom views.
None of that means Notion trapped your data. It means the export needs cleanup, and almost no guide tells you what the cleanup actually involves. Here is what I found running a real export in July 2026, and the order to fix it in.
What Notion's export actually produces
From a page, database, or full workspace, choose Export and pick Markdown & CSV. Notion generates one .md file per non-database page and one .csv file per database, with any subpages nested under a database exported as their own Markdown files, per Notion's own export documentation. Images and file attachments come along inside per-page folders, so nothing gets left behind on that front.
The output is internally consistent. Every link inside the export points at a file that genuinely exists in the same package, with the exact filename Notion generated. That consistency is also exactly what makes the export fragile the moment you touch it.
Notion also offers PDF and HTML exports from the same menu, and those are worth knowing about even if Markdown is your actual goal. PDF is a dead end for reuse, useful only as a static archive copy. HTML preserves formatting and comments better than Markdown does, but almost nothing outside a browser reads it usefully. If your end goal is another notes app or a static site, Markdown is still the right format to leave with, even with the cleanup it demands.
The hashed filename problem

A page called "Q3 Marketing Plan" does not export as Q3 Marketing Plan.md. It exports as something closer to Q3 Marketing Plan a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4.md, the title followed by a 32-character hexadecimal page ID, confirmed against a real export run in July 2026. Every nested subpage adds another folder with the same pattern, which means a workspace with any real depth produces paths that are, cumulatively, extremely long.
That length is not just ugly. On Windows, stacking enough nested folders and IDs runs into the operating system's roughly 260-character path limit. Files near the bottom of a deep tree can silently fail to open or extract, with no error telling you why.
If you are on Windows and your workspace has more than two or three levels of nesting, extract with 7-Zip rather than the built-in tool. Or flatten the structure ahead of time by unchecking "create folders for subpages" before you export, which trades folder organization for shorter, safer paths.
Internal links after export
Every @page mention and inline link Notion generates points at the exact hashed filename of its target, because that is the only name Notion has for it. This works as long as you never rename or move a file. The instant you clean up a filename by hand, which is the natural first instinct, every link that pointed at it breaks, and there is no warning when it happens. You find out later, when you click a link in your new notes app and land nowhere.
The workaround is order of operations, not a tool: do all your renaming and reorganizing after you have converted or imported the files somewhere with its own link resolution, never inside the raw export folder itself.
Databases become CSV, and what that loses
A Notion database does not export as Markdown. It exports as a .csv file, with any pages nested inside the database exported separately as Markdown files that reference back to the row.
You keep the raw data: every property, every value, every row. You lose the view. Filters and sorts do not travel. Grouped board layouts do not travel. A relation or rollup formula that referenced another database does not travel either. A spreadsheet has no concept of a formula that reaches into a different table.
You can only export the view you currently have open, not every saved view on the database. Form views cannot be exported at all. Switch to a table view first if the database you are exporting was set up as a board or gallery, since exporting from those views produces a less complete CSV.
You can also export a single database on its own rather than the whole workspace. That is worth doing if you only actually need one table out of a much larger Notion setup.
Images and file attachments
Images and uploaded files are preserved inside the export package in per-page folders, and this is the one part of the process that works close to painlessly. The only real gotcha is size and time: Notion warns that large workspace exports can take up to 30 hours to process, and you get the download by email rather than an instant browser download, with the link expiring after seven days. Kick off a big export early and do not wait until you need the result the same day.
The three export formats, compared
| Markdown & CSV | HTML | ||
|---|---|---|---|
| Pages | One .md file each |
One .html file each |
One .pdf file each |
| Databases | Flattened to .csv, views lost |
Table rendered as-is, views lost | Table rendered as-is, views lost |
| Internal links | Work if filenames stay untouched | Work inside the export folder | Do not work, static only |
| Best use | Moving into another notes or docs tool | Archiving with formatting intact | A read-only snapshot, nothing more |
Markdown & CSV is the only format worth choosing if the goal is to actually use the content somewhere else afterward.
A worked example: exporting a single project
Say you only need one project out of a much larger workspace, a shared client folder with a dozen pages and one tracking database. Open that top-level page rather than the workspace root, and choose Export from its own three-dot menu. You get a self-contained package scoped to just that page and everything nested under it, instead of the entire workspace.
This matters more than it sounds like it should. A full workspace export of a large team's Notion instance can genuinely take the full 30 hours Notion warns about, and you are stuck waiting on all of it even if you only wanted one folder. Scoping the export to the specific page you need is consistently the faster path, and the resulting filename problem is proportionally smaller too, since a 12-page export produces a much shallower folder tree than a multi-year workspace does.
Cleaning the export into something readable
- Export the whole workspace first, in Markdown & CSV format, so you have a complete archive before you change anything.
- Leave the raw export folder untouched. Copy it, and do your cleanup on the copy.
- Decide what you are actually migrating versus archiving. Not everything in a Notion workspace needs to survive the move.
- Batch-rename hashed filenames only after import, using whatever tool you are moving into, so its own link resolution takes over before you touch a name.
- For databases you still need as structured data, reopen the CSV in a spreadsheet and rebuild only the views you actually use day to day. Do not try to preserve every filter you built for a Notion dashboard you rarely opened.
Flow's importer expects an Excel workbook rather than raw Notion Markdown, so if you are moving into Flow specifically, converting the cleaned Markdown into rows on the import template is the more reliable path than trying to script a direct Markdown import. See importing the result into Flow for the exact template and column headings.
Frequently asked questions
Does Notion export include images? Yes. Images and file attachments are packaged inside per-page folders alongside the exported Markdown, and this part of the export is reliable.
Why do my exported Notion filenames have long codes? Notion appends the page's internal 32-character hexadecimal ID to the title for every exported file and folder. This keeps every internal link resolvable inside the export, at the cost of very long, ugly filenames.
Can I export a single Notion database to Markdown? Yes. Open the database and choose Export from its own menu rather than exporting the whole workspace. The database itself still comes out as a CSV, with any subpages as separate Markdown files.
Do internal Notion links still work after export? Yes, as long as you do not rename or move any exported file. Every link points at the exact hashed filename Notion generated, so renaming a file breaks every link that referenced it, silently.
Is there a size limit on Notion exports? Not a hard size limit for normal use, but large workspaces can take up to 30 hours to process, arrive as an emailed download link, and that link expires after seven days, per Notion's own help documentation.
Related reading
- Migrating from Notion properly
- Notion alternatives you buy once
- Why Markdown travels well
- Importing the result into Flow
- Flow compared with Notion
- What owning your notes means
My verdict
Export the whole workspace first and touch nothing in that folder. Do your renaming and reorganizing on a copy, after the files have landed somewhere with its own link system, and the three things that look broken on day one, filenames, links, and databases, all become manageable rather than catastrophic.