Skip to content

Export Notion to Markdown: Keep Pages, Links and Databases

How to export Notion as Markdown & CSV, what the zip really holds, and how to turn it into clean pages with working links and real database tables.

Productivity··11 min read

To export Notion to Markdown, open the page, click ••• at the top right, choose Export, pick Markdown & CSV from the dropdown, switch on Include subpages and click Export. For everything you have, go to Settings, then General under Workspace, and choose Export all workspace content (Notion Help). Either way you get a zip: pages as .md files, databases as .csv files.

That zip keeps your words, but it isn't tidy. Every file name ends in a 32-character ID, each database is a spreadsheet next to a folder of one-file-per-row pages, and the links between pages point at those long names. Here's what to expect and how to end up with pages you'd actually want to keep.

The export, step by step

One page and everything under it, on desktop or the web:

  1. Open the page and click ••• at the top right, then Export.
  2. In the window that opens, choose Markdown & CSV as the format.
  3. Switch on Include subpages. Leave it off and you get only that one page.
  4. Click Export and save the zip.

The whole workspace. Go to Settings in the sidebar, select General under Workspace, and choose Export all workspace content. This one doesn't download straight away. Notion emails you a link (or puts it in your Notion inbox if email notifications are off), the export "can take up to 30 hours to process" for a big workspace, and the link expires after 7 days. It only works on desktop or the web, and pages you can't open yourself, such as other members' private pages, are left out (Notion Help). If you don't see the option at all, a workspace owner may have turned export off under Settings, then Security.

Two more things to know. For databases, Notion exports either the current view or the default view of each one, and "exporting all views at once isn't supported" (Notion Help). On Windows, very long folder paths can stop the built-in unzip tool: Notion suggests turning off Create folders for subpages, or extracting with 7-Zip.

What's actually in the zip

We opened several real exports while building our importer, and they share the same shape:

Two file trees. As Notion gives it: the zip you download holds Export Part-1.zip and Part-2.zip, a zip inside the zip, with more Parts for big exports. Inside Part 1 is an Export folder with index.html, "Website relaunch" plus a 32-character hex ID and .md, and a folder of the same name holding homepage-sketch.png, a Tasks CSV for the view you picked, a Tasks _all.csv with every property, and a Tasks folder of row pages. After cleanup: Website relaunch.md and a Website relaunch folder with homepage-sketch.png, Tasks.md as one table, and a Tasks folder holding only the row page that has notes, with the IDs gone and links still working.

  • A zip inside a zip. The file you download holds Export-<id>-Part-1.zip, and for bigger exports Part-2.zip and so on. Treat the Parts as one export and keep them together.
  • An ID on every name. Files are called Title <32 hex characters>.md, and each page's subpages and images sit in a folder with the same name. Two pages called "Untitled" are told apart only by that ID.
  • Two CSVs per database. Tasks <id>.csv has the columns of the view you exported, in that view's order. Tasks <id>_all.csv has every property. Both are UTF-8 with a byte order mark at the start.
  • Row pages with Key: value lines. Each database row is also its own .md file: the title, then one line per filled-in property (Status: In progress), then any notes you wrote inside the row.
  • Encoded, relative links. A link to another page reads [Tasks](Website%20relaunch%208f3e…/Tasks%202c9d….md). Spaces become %20. A link to a database points at a .md file that doesn't exist, because the database was written as a .csv. Links to pages outside the export lead nowhere.
  • Callouts as raw HTML. Notion's help says it plainly: "Callout blocks will be exported as HTML, as there is no Markdown equivalent." You get <aside> tags with the emoji, or a link to one of Notion's icon images, inside.
  • Dates frozen as text. A date mention becomes @November 16, 2026. A relative one becomes @Today, with no record of which day that was.
  • Images in folders. Pasted images sit in the page's folder, under their original file name in recent exports and Untitled.png, Untitled 1.png in older ones.

Formulas and rollups come out as their values only, and every property, from checkboxes to dates, is plain text. Comments aren't in the Markdown export at all; Notion only offers them with HTML.

Cleaning it up by hand

For a few dozen pages, a text editor with find-and-replace across files does most of it.

  1. Unzip twice. Unzip the download, then unzip every Part into the same folder, so the paths merge.
  2. Fix the links first. Search all files with the regular expression %20[0-9a-f]{32} and replace it with nothing. That turns Tasks%202c9d….md into Tasks.md in every link, folder path and CSV cell. The raw IDs in file names, preceded by a space, aren't touched yet.
  3. Rename the files and folders to match. Use a bulk renamer to remove [0-9a-f]{32} (a space, then the ID) from every name, deepest files first so the folder paths stay valid. Watch for clashes: two pages called "Untitled" now want the same name.
  4. Point database links at the CSV. Change links that end in Tasks.md to Tasks.csv, or paste the CSV into a Markdown table and keep Tasks.md.
  5. Decide on callouts. Leave the <aside> blocks, or turn them into quotes.

What you can't fix by hand is the information that's gone: the real date behind @Today, the types of your database columns, and links to pages you didn't export.

Or import the zip in our Markdown Editor

We built a Notion importer into our Markdown Editor because the cleanup above is tedious and easy to get wrong. It reads the export in your browser. Nothing is uploaded, and there's no Notion login or token to hand over.

  1. Open the editor, open the ••• menu and choose Import .md, .zip or Notion export. Pick the zip exactly as Notion gave it, or several Part zips together. If you've already unzipped it, use Import a folder instead.
  2. The editor spots the export and shows its page tree, with a count of pages, databases, rows and images. Untick anything you don't want; unticking a page leaves out everything under it.
  3. Choose where the pages go (inside a new "Notion import" page, or at the top level) and click Import.

The Import from Notion dialog in the Markdown Editor. Its subtitle reads "Notion export detected, read in this browser, nothing is uploaded". A summary line says 4 pages, 2 databases, 8 rows, 1 image from "Studio". Below is a tree of ticked checkboxes: Meeting notes; Reading list, a database with 3 rows; Website relaunch with 1 image, containing Launch checklist and the Tasks database with 5 rows, which holds the page Write the new homepage copy. At the bottom, a choice to put them inside a new page called Notion import or at the top level, and an Import 6 pages button.

Here's what it does with each of the problems above:

  • Names. Titles come from each page's own heading, not the shortened file name, and the IDs disappear. Pages with the same title get a number ("Untitled 2"), so every link points at exactly one page.
  • Links. Every link is matched by the Notion ID at the end of its target, across all the Parts. That covers encoded paths, the database links that point at a missing .md, and notion.so addresses of pages that are in the export. They become the editor's [[page links]], so backlinks work. A link to a page outside the export is kept as plain text and listed in the report.
  • Databases. It reads the _all.csv file, puts the exported view's columns first, and guesses each column's type from its values: checkbox, number, date, URL or select tags. A dated column that includes times or date ranges stays text so nothing is lost. Relations become page links. A row you wrote notes in becomes its own page, linked from its title cell, with its properties listed at the top.
  • Callouts, dates, to-dos. <aside> blocks become callouts, with Notion's own icons swapped for a matching emoji. Date mentions become date chips. Empty to-dos are dropped, and code blocks keep their language.
  • Images. Pasted and embedded images go into the editor's image store in your browser, including ones whose names Notion mangled.

A diagram of a Notion database export becoming one table. The Tasks _all.csv file lists Task, Status, Due, Done, Estimate and Tags as plain text, and the row page for "Write the new homepage copy" starts with Status: In progress and Due: November 12, 2026 lines before its notes. The result is one table where Task is text with a link to the row's page, Status a select, Due a date, Done a checkbox, Estimate a number and Tags a multi-select. Only the row with notes keeps its own page.

The database is still Markdown underneath: a plain pipe table with one hidden comment line above it that records the column types. Open the page in any other Markdown app and you see an ordinary table.

The imported Tasks database in the Markdown Editor, on a page titled Tasks with 1 backlink. It has a search box, a Filter button and a count of 5 rows. The columns Task, Status, Due and Done are visible, with more to the right. The first task, Write the new homepage copy, is underlined as a link to its own page. Status shows coloured tags (In progress, Done, Not started), Due shows dates such as Nov 12, 2026, and Done shows checkboxes, ticked for Pick a typeface.

When it finishes, it says what didn't come across instead of dropping it quietly: links to pages outside the export, relative dates such as @Today, attachments it couldn't keep, and so on, each with the page it was on.

The report after an import. It reads "Imported 4 pages, 2 databases, 8 rows, 1 image". Under "What didn't come across" are three groups, each with a count of 1: relative dates like @Today, which Notion exports without the real date; links to pages that aren't in the export, kept as text; and files other than images, not imported because the editor keeps images only. A note says Notion's Markdown export has no comments, page icons or covers, formulas and rollups come in as their values, and synced blocks as copies.

What it doesn't do (yet)

  • Notion's HTML export isn't supported. The editor recognises it and asks you to export again as Markdown & CSV.
  • Images are the only attachments it keeps. A PDF or audio file becomes a "📎 file name" line and shows up in the report. Images that live on the web stay as links, and an image over 25 MB isn't saved.
  • Big databases are trimmed. A table holds up to 2,000 rows and 50 columns; anything over that is listed.
  • Your browser's storage is the limit. Pages are kept in this browser, which leaves room for a few megabytes of text in total. If what you've ticked won't fit, the dialog says so before importing; untick part of it and bring the rest in later, or export one top-level page at a time.
  • Importing again doesn't update anything. It won't refresh the pages from an earlier import, so delete those first if you want to bring in a newer export.
  • Inline databases become a page of their own, linked from where they sat, rather than a table in the middle of the page.

Some things aren't in the Markdown export to begin with, so no importer can bring them back: comments, page covers, the formulas behind values, and which view had which filter.

To take your pages somewhere else afterwards, Export → All pages (.zip) writes one .md file per page, in folders that follow the page tree, with [[page links]] kept.

Moving to Obsidian instead

If Obsidian is where you're going, its official Importer plugin has a Notion option, and it works differently. Its file method needs Notion's HTML export, not Markdown ("Make sure you use HTML as the export format in Notion"), and its help page says that method "does not preserve Databases". Its API method connects to your workspace with an integration token and turns databases into Bases, importing only each database's primary view (Obsidian Help). So pick the export format for the tool you're moving to before you start, because a big workspace export can take hours each time.

You can also keep the Markdown & CSV export and run it through our Notion to Markdown converter. It uses the same importer as the editor but writes a zip of plain files you can open as a vault: names without the IDs, [[wiki links]] or relative links, images in an attachments folder beside each page, and every database as a Markdown table with a CSV next to it.

productivitynotionmarkdownobsidiannotesexport

Share this post