How to Export Confluence Pages to Markdown (2026 Guide)
Confluence has no “Export to Markdown” button. Atlassian stores pages in its own storage format (an XHTML dialect full of <ac:structured-macro> tags), offers PDF, Word, HTML and XML exports, and leaves Markdown to you. This guide covers every working method in 2026, from a single page to a whole space, with the exact commands, and tells you which one to pick for your situation.
Short version:
| You need to export… | Use |
|---|---|
| 1 to 50 pages, as clean as possible | Minibase (one click per page) |
| A whole space, from the terminal, for free | confluence-markdown-exporter (cme) |
| A whole space, from inside Confluence, no terminal | A Marketplace app (Markdown Exporter for Confluence) |
| Something you can script in a pipeline | REST API + Pandoc |
| Only the native tools | HTML/XML space export + Pandoc, then cleanup |
Why there is no Markdown export (and what Confluence does export)
Confluence’s native exports, Cloud and Data Center:
- Single page:
•••menu → Export → PDF or Word. On Cloud there is no per-page HTML export; on Data Center the same menu adds HTML. - Whole space: Space settings → Manage space → Export space (Cloud) or Space tools → Content Tools → Export (Data Center) → HTML, XML or PDF. HTML gives you one
.htmlper page plus anattachments/folder and anindex.html. XML is the backup format, meant for re-import into another Confluence, not for reading.
Two things people search for and hit a wall on:
- “Export Confluence page to HTML” on Cloud: you can’t do it per page. Export the space as HTML and take the page you need from the ZIP, or use the REST API with
body-format=export_view(Method 5), which returns the rendered HTML of a single page. - “Confluence HTML export template”: there is no customisable HTML export template on Cloud. Data Center lets admins customise the PDF layout and stylesheet (Space tools → Look and Feel), but the HTML export markup is fixed. If you need a different HTML structure, post-process the export, or convert it to Markdown and regenerate HTML from that.
Everything below starts from one of those exports, or bypasses them.
Method 1: Minibase (fastest for individual pages)
Minibase is a Chrome and Firefox extension that converts the page you are looking at into clean Markdown with one click, Confluence included.
- Open the Confluence page in your browser (you are already logged in, so SSO, permissions and restricted pages are not a problem).
- Click the Minibase icon.
- A
.mdfile lands in your Vault folder.
What you get: the page text with its heading hierarchy, tables as Markdown tables, code blocks with their language tag, info/warning panels as block quotes, expand sections fully expanded, links preserved, and a header with the page title, space and last-updated date.
What gets dropped: the sidebar, the page tree, comments, the editor chrome, Atlassian CSS, and macros that render nothing readable (Jira issue lists become their visible text).
Example output, from a typical runbook:
# Deployment Runbook: Production API
**Space:** Engineering
**Last updated:** March 12, 2026
## Pre-Deployment Checklist
- [ ] All CI checks passing on `main`
- [ ] Database migrations reviewed and approved
- [ ] Feature flags configured for gradual rollout
## Deployment Steps
### 1. Create Release Branch
\`\`\`bash
git checkout -b release/v2.4.0 main
\`\`\`
Best for: 1 to 50 pages, anything behind SSO or restricted permissions, and anyone who wants the cleanest Markdown with zero setup. Not for: exporting 3,000 pages; that is a job for Method 2 or 3.
Method 2: confluence-markdown-exporter (free CLI, whole spaces)
confluence-markdown-exporter is an open-source Python tool that uses the Confluence API to export a page, a page with its children, or an entire space to Markdown, with attachments downloaded and relinked. It converts common macros to Markdown equivalents, extracts Mermaid diagrams as fenced ```mermaid blocks, saves draw.io diagrams as attachments, and can emit front matter and Obsidian-style task lists.
# install (also: brew install confluence-markdown-exporter)
pip install confluence-markdown-exporter
# first run: it asks for your Confluence URL, email and API token
cme config
# one page (with or without its children)
cme pages https://your-domain.atlassian.net/wiki/spaces/ENG/pages/123456/Runbook
cme pages-with-descendants https://your-domain.atlassian.net/wiki/spaces/ENG/pages/123456/Runbook
# a whole space
cme spaces ENG --output ./confluence-export
Create the API token at id.atlassian.com/manage-profile/security/api-tokens. The CLI changed between versions, so check cme --help if a subcommand is named differently in yours.
Good: free, handles thousands of pages, keeps attachments and the page tree as folders, output tuned for Obsidian, Gollum and Azure DevOps wikis.
Less good: complex macros (Jira filters, Confluence Questions, third-party apps) come out as their raw text or a placeholder. Expect to review the result on a sample before trusting a full migration.
Best for: engineers migrating a space to Obsidian, Docusaurus, GitBook or a Git repo.
Method 3: Marketplace apps (whole spaces, no terminal)
If you cannot run a CLI, Atlassian Marketplace has apps that add the missing button inside Confluence. The best known is Markdown Exporter for Confluence (by Narva, available for Cloud and Data Center): open a page, choose Export to Markdown, pick the page, the page tree or the whole space, and download a ZIP of .md files with attachments.
Good: no setup, respects your permissions, handles page trees and attachments, works for non-technical teams.
Less good: paid per user per month for the whole site (Cloud pricing is per-tier), needs a site admin to install, and your pages pass through the vendor’s Forge app. Check the data-residency terms if that matters to you.
Best for: teams where a site admin can install an app and nobody wants to touch Python.
Method 4: Native HTML export + Pandoc
The no-tools route. Export the space as HTML, then convert each file with Pandoc:
# convert one page, pulling images into ./media
pandoc "Runbook_123456.html" -f html -t gfm --wrap=none \
--extract-media=./media -o Runbook.md
# convert the whole export
for f in *.html; do
pandoc "$f" -f html -t gfm --wrap=none --extract-media=./media -o "${f%.html}.md"
done
What you will have to clean up afterwards:
- Navigation and breadcrumbs at the top of every file (the export wraps each page in the site layout). Strip everything before the
<div id="main-content">with a one-linesedor a small script before converting. - Tables with merged cells or nested lists, which GFM cannot represent; Pandoc flattens them.
- Code blocks lose their language, because the export marks them with CSS classes rather than
<code class="language-x">. - Images reference
attachments/<page-id>/<file>;--extract-mediacopies them next to the Markdown, but the paths need a search-and-replace if you reorganise folders. - Macros (expand, status, info panels, Jira) are rendered to their visible HTML, so they survive as text, but with Atlassian’s
<div class="confluence-information-macro">wrappers that Pandoc turns into plain paragraphs.
Best for: a one-off archive where “readable” matters more than “pretty”, or a Data Center instance where you cannot install anything.
Method 5: REST API (for pipelines)
For a repeatable export, pull the pages yourself. On Cloud, API v2 returns a page body in the format you ask for; export_view gives you the fully rendered HTML, which converts much better than the raw storage format.
curl -s -u "you@company.com:$ATLASSIAN_TOKEN" \
"https://your-domain.atlassian.net/wiki/api/v2/pages/123456?body-format=export_view" \
| jq -r '.body.export_view.value' > page.html
pandoc page.html -f html -t gfm --wrap=none -o page.md
A whole space in Python, 30 lines:
import requests, subprocess, pathlib
base = "https://your-domain.atlassian.net/wiki/api/v2"
auth = ("you@company.com", "ATLASSIAN_TOKEN")
space_id = "123" # GET /spaces?keys=ENG to find it
url = f"{base}/spaces/{space_id}/pages?body-format=export_view&limit=100"
out = pathlib.Path("export"); out.mkdir(exist_ok=True)
while url:
r = requests.get(url, auth=auth).json()
for p in r["results"]:
html = p["body"]["export_view"]["value"]
md = subprocess.run(["pandoc", "-f", "html", "-t", "gfm", "--wrap=none"],
input=html, text=True, capture_output=True).stdout
(out / f"{p['title'].replace('/', '-')}.md").write_text(f"# {p['title']}\n\n{md}")
nxt = r.get("_links", {}).get("next")
url = f"https://your-domain.atlassian.net{nxt}" if nxt else None
Add attachments (/pages/{id}/attachments), the page hierarchy (parentId) and version metadata as needed. On Data Center, the equivalent is /rest/api/content/{id}?expand=body.export_view.
Best for: engineering teams who want the export to run nightly, or who need to transform content on the way out (rewrite links, add front matter, split by team).
Which method should you use?
| Scenario | Method | Why |
|---|---|---|
| Save a handful of pages for yourself | Minibase | One click, cleanest output, works behind SSO |
| Feed Confluence docs to Claude, ChatGPT or an internal LLM | Minibase for a curated set, cme for everything | Markdown is what LLMs read best; see why Markdown is the language of AI |
| Migrate a space to Obsidian, Docusaurus, GitBook | confluence-markdown-exporter | Keeps the tree, attachments, Mermaid |
| Non-technical team, site admin available | Marketplace app | A button inside Confluence |
| Archive before a licence ends, no installs allowed | HTML export + Pandoc | Native tools only |
| Recurring export, transformations, CI | REST API | You control every step |
After the export: making the Markdown useful
- Open it in Obsidian and your space becomes a linked, searchable vault. Confluence page links that pointed to
/wiki/spaces/...need a pass to become[[Page Title]]wikilinks;cmedoes most of that for you. - Put it in Git. Documentation that lives next to code gets reviewed like code. Docusaurus, MkDocs and GitBook all build straight from a folder of Markdown.
- Ask an AI about it. Point Claude Projects, ChatGPT, NotebookLM or a local RAG setup at the folder. Markdown keeps headings and tables intact, which is exactly the structure these models use to answer accurately; PDF exports lose it.
- Keep it forever. Plain text files are readable in any editor, on any system, in twenty years. That was never true of a Confluence space.
FAQ
Does Confluence export to Markdown natively?
No. Cloud and Data Center export PDF, Word, HTML and XML. Markdown needs an extension (Minibase), a CLI (confluence-markdown-exporter), a Marketplace app, or a conversion of the HTML export with Pandoc.
Can I export a whole Confluence space to Markdown?
Yes: cme spaces <KEY> does it from the terminal for free, a Marketplace app does it from inside Confluence, and the REST API lets you script it.
Do attachments and images come along?
With cme, the Marketplace apps and pandoc --extract-media, yes, into a folder next to the Markdown files. The browser extension saves the text and links to the original image URLs.
What happens to macros? Simple ones (info panels, expand, status, code) convert to Markdown equivalents or plain text. Dynamic ones (Jira issue lists, page properties reports, third-party apps) render to whatever text is visible at export time.
Can I export a single Confluence page to HTML on Cloud?
Not from the UI; the per-page menu offers only PDF and Word. Use the REST API with body-format=export_view, or export the whole space as HTML and take the page you need.
Need one Confluence page in clean Markdown right now? Install Minibase, open the page, click once. Free for 3 saves a month. Related: save Confluence pages as Markdown for your AI knowledge base and SharePoint to Markdown.
Continue reading
How to Save Confluence Pages as Markdown
Convert Confluence wiki pages to clean Markdown. Migrate documentation, archive knowledge base articles, and escape Atlassian's proprietary format.
How to Export SharePoint Pages to Markdown (2026 Guide)
Escape SharePoint's proprietary format. Export pages and OneNote content to clean, portable Markdown via Chrome extension, Graph API, or scripts.
How to Export Google Docs to Markdown (2026 Guide)
Every way to export Google Docs to clean Markdown, with headings, tables, and images intact. One-click extension, built-in, and API methods.
How to Export Quip Documents to Markdown (2026 Guide)
Migrate off Quip before Salesforce sunsets it. Practical ways to export Quip documents to clean Markdown, from Chrome extension to APIs.