Skip to main content

Export Confluence to Markdown — for LLMs, RAG Pipelines and Git

· 4 min read

Markdown is the lingua franca of everything Confluence isn't: LLM context windows, RAG pipelines, Git-based docs, static site generators. So the request shows up wherever those worlds meet — "can you get our Confluence into Markdown?" — and the honest answer starts with a gap: Confluence Cloud has no native Markdown export. Built-in export gives you PDF, Word, HTML and XML; Markdown isn't on the list. Here's how to get there anyway, and how to make the output something a pipeline can actually consume.

Quick answer: For one page, copy-paste through a converter. For anything real — a space, a corpus, an LLM knowledge base — use Modern Importer & Exporter for Confluence: select pages or whole spaces, choose Markdown (plus any sibling formats in one ZIP), and get clean .md files with images bundled and a manifest listing everything exported.

Method 1 — Copy-Paste Through a Converter​

Open the page, copy the content, paste it into any HTML-to-Markdown converter or your editor's paste-as-Markdown.

Good for: one page, once — a doc you're moving into a README today.

What's missing: structure under scale. Tables mangle, macros vanish or arrive as HTML fragments, images break (they point at your Confluence instance, which the reader — or the model — can't access), and nobody is doing this four hundred times. It's a bridge, not a pipeline.

Method 2 — HTML Export + a Conversion Step​

Confluence's native space export includes HTML. Convert the HTML bundle to Markdown with a tool (Pandoc is the standard), post-process the leftovers.

Good for: one-off migrations where you already own a conversion script.

What's missing: two conversion layers, each with its own losses. Confluence's HTML export is built for archival (it carries its own CSS, navigation and storage-format quirks), so the Markdown that emerges needs real cleanup — and images still need re-linking. It works; it's just a project.

Method 3 — Export Markdown Directly​

Modern Importer & Exporter for Confluence exports Confluence content as Markdown natively — no intermediate format:

  1. Open Apps → Modern Importer & Exporter, or right-click a page for a single export.
  2. Select the pages or spaces you want.
  3. Choose Markdown — or bundle Word, HTML, JSON, XML in the same ZIP if the migration needs siblings.
  4. Export: images are downloaded and included, files are organized by space, and a manifest lists every page that came out.

The last two details are the ones that decide whether the output is usable. Images in the bundle means the Markdown references files that actually exist next to it — not https://your-instance.atlassian.net/wiki/download/... URLs that 404 outside Confluence. And the manifest is what turns "a folder of files" into a corpus: your RAG ingestion or docs repo can walk the manifest, know what each file is, and detect gaps.

Making the Output LLM-Ready​

If the destination is a model rather than a human, the export is step one:

  • Chunk along the headings. Markdown's #/## structure is what chunkers want — no HTML-stripping step means no boilerplate baked into every chunk.
  • Ship the manifest with the corpus. Page titles, spaces and timestamps let retrieval cite sources and let you re-export only what changed.
  • Keep code fences. Markdown export preserves fenced code blocks, which is the difference between a model that can quote your API example and one that quotes mangled indentation.
  • Re-export per sync, not per crisis. Because the exporter runs the same selection every time, refreshing the corpus is a two-minute task — schedule it like a backup.

For the other half of the pipeline — chunking, embedding, retrieval patterns on Confluence content — see RAG with Confluence: Build an AI Knowledge Base.

Which Method Should You Use?​

NeedUse
One page, onceCopy-paste through a converter
You already own a Pandoc pipelineHTML export + convert
A space, a corpus, or anything an LLM readsDirect Markdown export

Try Enhanced Markdown for Confluence

Write Markdown with live split preview, Mermaid diagrams, KaTeX/LaTeX math, and 190+ code languages — all in one macro, free for up to 10 users.

Get it on the Atlassian Marketplace