When Notion exports content as Markdown, it often includes additional metadata, file structures, and formatting styles that aren’t strictly “plain Markdown.” To convert Notion exports to plain Markdown, follow these steps:
1. Export from Notion
-
Go to the Notion page or workspace.
-
Click on “⋯” > Export.
-
Choose:
-
Export format: Markdown & CSV
-
Include subpages: Yes (optional)
-
-
Click Export and unzip the downloaded file.
2. Clean Up the File Structure
-
Notion creates a folder for each page and subpage, with extra
.md
files andmedia/
directories. -
Flatten the structure if you only want the Markdown content:
-
Move all
.md
files into a single directory. -
Optional: Discard image/media folders if not needed.
-
3. Remove Notion-Specific Formatting
Typical issues in Notion-exported Markdown:
-
Internal Notion links like
[](notion://...)
-
Extra
---
,##
, or section dividers -
Image embeds using syntax like

referencing local paths
Tools to automate cleanup:
You can use CLI tools or scripts:
Using sed
(Unix/macOS/Linux):
4. Optional: Use a Markdown Linter or Formatter
Tools like markdownlint
can help reformat and tidy the content:
Or use an online Markdown beautifier to remove irregular line breaks or spacing.
5. Convert to Truly Plain Markdown (No Extras)
-
Ensure:
-
No frontmatter (
---
) -
No reference-style links or non-standard syntax
-
Clean headers (
#
,##
), lists (-
,*
,1.
), and code blocks (“`)
-
Example cleanup result:
Before:
After:
Optional: Use a Script to Batch Clean
Here’s a simple Node.js script to clean all .md
files in a folder:
Summary
To convert Notion exports to plain Markdown:
-
Export as Markdown
-
Remove Notion-specific elements (links, metadata, media)
-
Flatten structure
-
Clean using scripts or CLI tools
-
Optional: Lint/format the output
This gives you clean, portable Markdown suitable for blogs, static site generators, or documentation systems.
Leave a Reply