How to Export & Convert Notion to Markdown
Move your Notion pages to portable Markdown. Covers Notion's native export, converting blocks to MD syntax, handling databases, and cleaning up output.
Notion is a fantastic workspace, but your content lives inside a proprietary database on someone else's servers. If you've ever worried about lock-in, lost internet access, or simply want a permanent copy of your notes, exporting to Markdown is the move. Markdown gives you plain-text files you can open anywhere, version-control with Git, and repurpose into Word documents, PDFs, or web pages. This guide walks through Notion's native Markdown export, how Notion blocks map to Markdown syntax, and how to clean up the output so it's genuinely useful.
Why move Notion content to Markdown?
Three reasons come up again and again:
- Portability. A
.mdfile opens on any device, in any editor, for the next thirty years. No subscription, no app updates, no export deadlines. - Future-proofing. Notion is a hosted product. If it changes pricing, shuts down, or you just want to leave, Markdown is your safety deposit box.
- Reuse. One Markdown file compiles into a Word doc, a PDF, an HTML page, or a static site. Notion's own export options are more limited.
Once you have Markdown, you can drop it into the Markdown to Word converter and hand a polished .docx to a colleague who doesn't use Notion — all processing happens locally in your browser.
Notion's native Markdown export
Notion has built-in support for exporting pages and entire workspaces as Markdown. The exact location of the export menu shifts occasionally between Notion updates, so rather than memorize a path that may change, here's what to look for: on any page, open the page's menu (the ••• control in the top-right) and choose Export. Notion then offers a format picker — choose Markdown & CSV.
What to expect from that export:
- Each page becomes a
.mdfile named after the page title. - Nested pages become subfolders, preserving the structure of your Notion workspace.
- Images and attachments are downloaded into a folder alongside the
.mdfiles, with links in the Markdown pointing to the local copies. - Databases export as CSV (see the next section).
- The whole bundle is delivered as a zip archive you unzip locally.
Export can take a while for large workspaces. Be patient, and unzip the archive into a dedicated folder so relative links resolve correctly.
How Notion blocks map to Markdown
Most Notion blocks translate cleanly into Markdown, but a few don't have a direct equivalent. Here's a reference for what to expect.
| Notion block | Markdown equivalent | Notes |
|---|---|---|
| Heading 1/2/3 | #, ##, ### | Maps directly |
| Text paragraph | Plain text wrapped in blank lines | Standard |
| Bold / italic / underline | **bold**, *italic* | Underline has no native Markdown equivalent |
| Strikethrough | ~~text~~ | GFM only — works in most renderers |
| Bulleted list | - item | Maps directly |
| Numbered list | 1. item | Maps directly |
| To-do / checkbox | - [ ] or - [x] | GFM task lists |
| Toggle | Rendered as a heading or list | Content is included; interactivity is lost |
| Quote | > quote | Maps directly |
| Divider | --- | Maps directly |
| Callout | Quote or indented block | Color and icon are lost |
| Code block | ```language fence | Language is preserved when set |
| Inline code | `code` | Maps directly |
| Image |  | Path points to the local export folder |
| Bookmark | [title](url) | Maps to a basic link |
| Equation block | $$ ... $$ | LaTeX preserved |
| Database / table | CSV file or basic Markdown table | See next section |
A few Notion features — like column layouts, synced blocks, and colored text — have no Markdown counterpart and either flatten to plain text or drop styling. That's expected: Markdown is intentionally simpler.
Handling databases and tables
Notion's exports handle databases in two ways depending on what you exported:
- Simple in-page tables usually become Markdown tables, which use pipe characters:
| Name | Role | Joined |
| ------ | -------- | ------- |
| Ada | Engineer | 2024-01 |
| Grace | Designer | 2024-03 |
- Full databases (the ones with properties, filters, and views) export as CSV files, one per database. Each row becomes a CSV record. From there you can either keep the CSV, write a small script to convert it into one Markdown file per row, or paste the data back into a Markdown table manually.
Tip: If your database has many rows, opening the CSV in a spreadsheet and exporting the relevant slice as a Markdown table is faster than copy-pasting row by row.
Cleaning up exported files
Notion's Markdown export is good but not pristine. A little cleanup makes the files far more pleasant to read and reuse:
- Remove UUIDs from filenames. Notion appends a 32-character ID to every page name (e.g.
My Page 3f2a1b...). Strip these for cleaner file names. - Rewrite image paths. Exported images live in folders with hashed names. Update the
references so they point to a cleanimages/directory, or upload the images to a host and swap in absolute URLs. - Delete redundant slug metadata. Some exports include extra slug lines at the top of each file — remove them unless you need them.
- Flatten nested folders if needed. Deep folder hierarchies make links fragile. Consider a single flat directory for small exports.
- Check escaped characters. Notion sometimes over-escapes punctuation like
*or_. Re-read the file and fix anything that renders oddly. - Rebuild internal links. Notion's internal page links become
[Page Name](page-uuid.md). If you renamed files in step one, update these references or convert them to your site's URL structure.
A quick find-and-remove pattern for the trailing filename IDs looks like this:
const fs = require("fs");
const path = require("path");
for (const file of fs.readdirSync(".")) {
if (!file.endsWith(".md")) continue;
const cleaned = file.replace(/\s[0-9a-f]{32}\.md$/i, ".md");
if (cleaned !== file) fs.renameSync(file, cleaned);
}
Run it inside your export folder and most of those ugly filenames disappear in one pass. Always back up the original export before running a rename script.
Tips for a smooth migration
- Start small. Export a single page first to see how the output looks before exporting your whole workspace.
- Keep one Notion source of truth until you've verified the export. Don't delete anything in Notion until you've spot-checked the Markdown.
- Move attachments deliberately. Images in particular need a permanent home — decide whether you'll host them yourself or upload to a service.
- Version-control the result. Once the files are clean, drop them into a Git repo so future changes are tracked and you have a permanent backup.
Conclusion
Notion to Markdown is one of the most useful migrations you can run, because it turns hosted content into plain text you truly own. The native export does most of the heavy lifting, and a short cleanup pass handles the rough edges. Once your content is in Markdown, it's ready for anything — paste it into the Markdown to Word converter to produce a polished .docx, or switch the output to HTML for the web. The whole pipeline runs in your browser, so your exported files never leave your machine.