Atlassian Tools

How to Export a Confluence Page to Markdown: 3 methods that work

•

10

min read

export confluence page to markdown

Share Links

Author

Nar Kumar Chhantyal

Founder & CEO

Sharing Links

Almost every development team finds itself in need of exporting in markdown for publishing content externally, migrating to tools like Notion or GitHub, creating backups and archiving, or simply feeding it to AI and LLMs. Confluence has no native Markdown export, so to export a Confluence page to markdown teams use one of three methods - Pandoc, manual script, or an Atlassian marketplace app. 

If you need to export confluence page to markdown you can:

  • Export the page to Word or HTML and convert it with Pandoc - it is a free solution, and like many such workarounds requires a high degree of manual work. The main downside of this method is that the formatting gets lost. 

  • Write a REST API script or use an open-source CLI. Like the previous method it is also free, quite flexible but requires a lot of coding and upkeep. 

  • Install a marketplace app such as Markdown Exporter for Confluence by Narva Software, it takes one click to bulk export, has the highest fidelity of the three and offers a 30-day free trial. 

Ultimately, the best way to Export a Confluence Page to Markdown depends on the team’s needs, development capacity, and tech capabilities. Below we discuss the three methods in detail.

What do teams use Confluence-to-Markdown exports for?

Teams export Confluence content to Markdown to move documentation into Git, publish it, back it up or feed it to AI tools.

  • Docs-as-code: moving docs into Git, where changes go through pull requests.

  • Static sites: publishing with MkDocs, Docusaurus or Hugo.

  • AI assistants and RAG: clean, structured text instead of HTML noise.

  • Obsidian and other Markdown tools: notes in an editor that stores plain files.

  • Backups and audits: a readable copy of key pages outside Confluence.

Can you export a Confluence page to Markdown natively?

No. Confluence Cloud has no native Confluence Markdown export: a single page either exports to PDF or Word, and if you want to export a whole space you can get it in HTML, XML, PDF or CSV formats. These built-in Confluence Cloud export options are fine for printing or archiving. They don't help when the destination is a plain-text file in a repository, and that's where documentation increasingly lives: Git diffs Markdown line by line, MkDocs, Docusaurus and Hugo build sites from it, and LLM and RAG pipelines read it far more reliably than a Word file.

Which method should you use?

Each method comes with benefits and some tradeoffs. The table below shows which solutions works best for different needs: 

convert confluence page to markdown

Method 1: How to export a Confluence page to Markdown with Pandoc?

To export a confluence page to Markdown with Pandoc you need to first export the page from Confluence to Word (.docx) or HTML. Once you have that file, run Pandoc, the free open-source document converter, to turn that file into GitHub Flavored Markdown. 

  1. Open the page and go to ••• > Export > Export to Word. Save the .docx file.

  2. Install Pandoc from pandoc.org or your package manager.

  3. Run the conversion from the folder that holds the file:

pandoc page.docx -t gfm -o page.md --extract-media=./media

-t gfm sets GitHub Flavored Markdown as the output, and --extract-media saves embedded images to a folder the .md file can point to. For a very short page, copying the content into a Markdown editor or an HTML-to-Markdown converter also works.

Pros: it’s free and you do not have to install anything on Confluence. 

Cons: You can only export one page at a time. macros, panels and diagrams are lost or flattened; images need extra steps; and internal links break. 

The real tradeoff with this solution is the cleanup the teams have to do after. It is doable for exporting one page here and there, but once the pages start to add so do the manual fixes.

Method 2: How to export Confluence pages to Markdown with the REST API or a script?

Exporting Confluence pages to markdown manually can also be done with the REST API or a script. To do it pull the page's storage-format body through the Confluence REST API with an API token, then convert it to Markdown with a script or an open-source CLI.

  1. Create an API token in your Atlassian account settings and store it like a password.

  2. Call the page content endpoint, for example in the v2 API:

curl -u you@example.com:$API_TOKEN \

"https://your-site.atlassian.net/wiki/api/v2/pages/123456?body-format=storage"

  1. Convert the result with the open-source confluence-markdown-exporter package on PyPI, or with your own html2md script.

See the official Confluence Cloud REST API documentation for endpoints and authentication. Storage format is XHTML-based, and macros appear in it as ac:structured-macro elements that a generic HTML-to-Markdown converter can't interpret, so every macro you care about needs its own rule.

Pros: This method is free, you can automate and run on a schedule. 

Cons: It needs development competency and takes development time. Custom macros need their own handling. Requires upkeep when the API changes; you need to manage tokens and security yourself.

Before you build a Confluence REST API export to Markdown pipeline on an open-source tool, check its README for supported macros. 

If you are considering one of the DIY solutions make sure to learn more about all the differences between the Markdown exporter and DIY pipeline.


From Confluence to GitHub, Without the Cleanup

Markdown Exporter keeps tables, code blocks and images intact, so your engineers ship docs instead of rebuilding them.

Method 3: How to export a Confluence page to Markdown with Markdown Exporter for Confluence?

The most convenient way to export a Confluence page to markdown is to do it via the marketplace app, such as Markdown Exporter for Confluence by Narva Software. 

To do it, Install Markdown Exporter for Confluence by Narva Software from the Atlassian Marketplace. Then open the page and choose Markdown Exporter > Single Export > Export to download an .md file, with the page's attachments saved in an "attachment" folder.

 Open the page.

  1. Click Markdown Exporter in the page byline, or go to ••• > Apps > Markdown Exporter.

  2. Choose Single Export.

  3. Click Export.

That's the whole Confluence page to MD flow, with no Word file in between and no command line.

You can bulk export Confluence Pages to Markdown, covering pages, page trees and entire spaces. 

To do it, Open a parent page, go to ••• > Apps > Markdown Exporter, choose Bulk Export, select the pages and click Export. You get one .zip with images, attachments and links between pages.

Pros: 

Cons: 

  • Compared to the manual solutions a Confluence admin has to install it. 

  • The app has known limitations, but can see the known issues and limitations beforehand 

Which method is right for you?

The choice depends solely on your needs when it comes to exporting Confluence pages to Markdown. Each method has its own advantages and place for usage. Pandoc works best for one-off exports of short pages. A script suits teams with developers who need automation. Markdown Exporter for Confluence suits regular, high-fidelity or bulk exports with no code. 

Before you export Confluence page to Markdown at any scale, run through this simple checklist:

  • How many pages? One or two: Pandoc. A tree or a space: a script or the app.

  • How often? Recurring exports pay back a script's setup or an app license.

  • Macros and diagrams? If they carry meaning, test what each method keeps.

  • Skill level: no command line on the team points to the app.

  • Budget: free methods cost developer and editing time instead.

  • Security rules: check where content is processed and who holds API tokens.

Start with one page

Whichever way you export Confluence page to Markdown, the honest test is your own content. Pick a page with a table, a panel and a diagram, run it through your preferred method and open the .md file. If Pandoc's output is clean enough, you're done. If it isn't, start the 30-day free trial of Markdown Exporter for Confluence and export the same page again. You'll see the difference in the first file, and we're here to help with the rest of the space.

Frequently asked questions about exporting confluence Page to Markdown

Can Confluence export a page to Markdown natively?

No. Confluence Cloud has no built-in Markdown export. A single page can be exported to PDF or Word, and a whole space to HTML, XML, PDF or CSV. To get Markdown, convert an export with Pandoc, use a REST API script, or use a Marketplace app such as Markdown Exporter for Confluence by Narva Software.

What is the easiest way to export a Confluence page to Markdown?

The easiest way is a Marketplace app. With Markdown Exporter for Confluence by Narva Software, you open the page, choose Markdown Exporter, then Single Export, and click Export. The app downloads an .md file in GitHub Flavored Markdown and saves the page's attachments in a separate folder. No code, command line or file conversion is needed.

Can I convert a Confluence page to Markdown for free?

Yes. Export the page to Word or HTML, then convert it with Pandoc, for example: pandoc page.docx -t gfm -o page.md. You can also pull the page through the Confluence REST API and convert it with an open-source script. Both methods are free, but they take manual work, and macros, panels and diagrams are often lost.

What Confluence content is lost when converting to Markdown?

Markdown has no equivalent for many Confluence features. Macros, page layouts, expand sections, panels, Jira issue macros and diagrams are the most likely to be lost or flattened. Plain text, headings, lists, links, simple tables and code blocks usually convert well. Dedicated apps keep more, for example by mapping panels to GitHub Flavored Markdown alerts.

How do I export an entire Confluence space to Markdown?

Use a script that walks the page tree through the Confluence REST API, or an app with bulk export. Markdown Exporter for Confluence by Narva Software exports page trees, folders, blogs or a whole space as a .zip file, with images, attachments and links between pages kept. Pandoc alone works only one page at a time.

Does Markdown Exporter for Confluence keep tables, code blocks and diagrams?

Yes. Markdown Exporter for Confluence by Narva Software outputs GitHub Flavored Markdown that keeps tables, code blocks, emojis, images and attachments. It also supports draw.io and Gliffy diagrams. Confluence panels become GFM alerts: Note stays Note, Success becomes Tip, Warning stays Warning and Error becomes Caution. Check the app's known limitations for edge cases.

Is it safe to export Confluence pages with a Marketplace app?

It depends on the app, so check its security credentials. Markdown Exporter for Confluence runs client-side in the browser, carries the Atlassian Cloud Fortified badge, and Narva Software is SOC 2 Type 2 certified, according to Narva Software. Before installing any app, review its Marketplace listing, data residency details and privacy policy.

Why export Confluence pages to Markdown?

Markdown is plain text, so it works with Git, docs-as-code tools and static site generators such as MkDocs, Docusaurus and Hugo. Teams export Confluence to Markdown to move documentation, to publish docs sites, to make backups, and to feed clean, structured content into AI assistants and retrieval-augmented generation (RAG) knowledge bases.

Nar Kumar Chhantyal

Founder & CEO

Nar is the founder of Narva Software and a former software developer with real-world experience using Atlassian tools. After facing the limitations of Jira and Confluence himself, he set out to build simple, effective apps that make teamwork easier. Today, his focus is on creating practical solutions that help teams work faster and smarter — and are trusted by companies around the world.

You might also like...

confluence math equations

Confluence has no built-in equation editor on Cloud or Data Center, so you add math equations by installing an equation app and inserting its macro.

10
min
how to embed html in confluence

Confluence Cloud has no native HTML macro, so every rendering option runs through an app or an embed.

5
min
OpenAPI Confluence

OpenAPI (Swagger) for Confluence is a new Atlassian Marketplace app by Narva Software that turns any OpenAPI or Swagger spec into interactive API documentation on a Confluence Cloud page.

6
min