DokuWiki to Markdown: How to Export Your Wiki Pages
If you have gone looking for an "Export to Markdown" button on a DokuWiki page, you already know it is not there. By default, DokuWiki stores every page in its own plain-text wiki syntax, and the built-in export menu does not offer Markdown as an option. That becomes a real problem the moment you want to migrate a wiki to Obsidian or a GitHub wiki, archive a knowledge base, or feed your documentation into an AI assistant as clean context.
The good news is that DokuWiki's export feature gives you a format file2markdown can read directly, so you do not need a plugin or admin access to get usable Markdown out of a page.
Why DokuWiki Has No Native Markdown Export
DokuWiki pages live on disk as .txt files written in DokuWiki's own wiki syntax (double asterisks for bold, ==== for headings, and so on), not Markdown.
Since the July 2026 release ("Mort"), DokuWiki can also read Markdown. An administrator can change the "Wiki syntax flavor" setting from its default, DokuWiki only, to Markdown or to a mix of both. That release adds a Markdown parser for writing pages and nothing more: it does not add a Markdown export, and it does not rewrite the pages already stored in DokuWiki syntax.
What DokuWiki has always had is a built-in export action that renders a page as XHTML. That is the route that actually gets you to Markdown today.
The Fastest Way to Export a DokuWiki Page to Markdown
- Open the page you want to convert and note its URL, for example
https://your-wiki.example.com/doku.php?id=some:page. - Add the export parameter to the end of that URL and load it. If the URL already contains a
?, as in the example, add&do=export_xhtml. If it does not, as on wikis with short addresses likehttps://your-wiki.example.com/some:page, add?do=export_xhtml. DokuWiki returns the page as a plain HTML document: the page content and its table of contents, with no wiki markup, no sidebar, and no site navigation. - Save that page from your browser, making sure the file is saved with an
.htmlextension. - Go to the HTML to Markdown converter at file2markdown.ai and upload the file.
- Download the resulting Markdown file and go through the checks in the next section.
This works because DokuWiki's export is just HTML, and HTML is one of the formats file2markdown accepts directly. There is no copy-pasting involved, which matters because DokuWiki's heading levels, internal links, and code blocks are easy to mangle with a manual copy-paste.
If your wiki requires a login to view pages, you will need to be signed in in the same browser before loading the export URL. The export respects the same read permissions as the normal page view.
What Comes Through, and What to Fix
We tested this route on the syntax reference page that ships with every DokuWiki install (wiki:syntax), taken from a public wiki, because that one page uses nearly every formatting feature.
These came through as they should:
- Headings, bold and italic text, and nested lists.
- Tables, including a cell merged across columns.
- Plain code blocks, as fenced code.
These need a look:
- The table of contents. The export starts with the page's table of contents. Its links point at DokuWiki's own anchors, which do not exist in the Markdown file, so delete that block.
- Links to other wiki pages, and images. In our test both were written as paths on the wiki, such as
/wiki%3Apagenameand/_media/wiki:dokuwiki-128.png. They stop working once the file leaves the wiki unless you put the wiki's address in front, and the image files themselves are not downloaded. - Cells merged across rows. The rows under a vertically merged cell come out one cell short, so their values shift one column to the left.
- Syntax-highlighted code. DokuWiki's highlighter links some keywords to documentation, and those links end up inside the code block as Markdown link syntax. Code blocks without highlighting are not affected.
- Footnotes. The markers and the footnote text are both kept, but as anchor links like
[1)](#fn__1)that no longer jump anywhere.
Exporting Multiple Pages at Once
DokuWiki does not have a one-click "export the whole wiki" feature the way some tools do. For a handful of pages, repeating the steps above page by page is realistic. For a larger wiki, the more practical approach is:
- Load the export URL for each page you need and save each one as its own
.htmlfile, keeping the page names so you can tell them apart later. - Collect the saved HTML files into a single
.ziparchive. - Upload the ZIP to the file2markdown converter. It opens the archive, converts every HTML file inside, and hands back one Markdown output covering the whole batch, with a
## File:heading above each page, as described in our guide on converting a ZIP full of files to Markdown.
This turns a multi-page export into one upload instead of dozens of one-off conversions.
What Not to Use: the Raw Export
DokuWiki also exposes do=export_raw, which downloads the page's original wiki syntax as a .txt file. Skip this one for this workflow: file2markdown does not accept plain .txt uploads, and even if it did, raw DokuWiki syntax is not HTML or Markdown, so there would be nothing for a converter to parse correctly. Stick with export_xhtml.
A Developer Alternative: Pandoc
If you are comfortable on the command line, you can convert the wiki syntax itself and skip the HTML step. Pandoc, the open-source document converter, lists DokuWiki markup among the formats it reads:
pandoc -f dokuwiki -t gfm page.txt -o page.md
With filesystem access to the wiki, the pages are the .txt files under data/pages, and a shell loop over that directory handles a one-time bulk migration. Without it, the raw export above gives you the same wiki syntax one page at a time.
On a short sample (a heading, a nested list, a table and a code block) the command gave us clean GitHub-flavored Markdown. We have not tested it on pages that use plugin syntax, so review the output against the original pages.
Why Convert DokuWiki Pages to Markdown for AI and Docs
Once your wiki content is in Markdown, it behaves like any other documentation source. You can drop it into an Obsidian vault, commit it to a GitHub wiki, or chunk it for a retrieval-augmented generation pipeline. As we cover in why Markdown is the format AI models actually want, LLMs parse structured Markdown headings and lists far more reliably than raw wiki markup or a page full of navigation HTML, which keeps your token usage down and your retrieved context relevant.
If you are migrating off other internal wikis at the same time, the same upload-based approach applies to Confluence pages and Jira issue exports.
Frequently Asked Questions
Does DokuWiki support exporting pages to Markdown directly?
No. DokuWiki's built-in export action produces XHTML (or raw wiki syntax, which you should avoid for this workflow). The Markdown support added in the July 2026 release is for writing pages, not for exporting them. You get to Markdown by exporting to XHTML and running that file through an HTML to Markdown converter.
Will tables and code blocks survive the conversion?
Mostly. In our test, tables came out as Markdown tables and plain code blocks as fenced code. Two things to check: a cell merged across rows shifts the rows under it one column to the left, and syntax-highlighted code picks up link syntax from DokuWiki's highlighter. Output from DokuWiki plugins is worth checking against the original page too.
Can I convert an entire DokuWiki space at once?
There is no built-in "export everything" button in DokuWiki. Export each page you need as HTML, bundle the HTML files into a ZIP, and upload the ZIP to file2markdown to convert the whole batch in one pass.
What if my DokuWiki instance requires a login?
The export URL respects the same read permissions as viewing the page normally. Stay signed in to the wiki in your browser when you load the export_xhtml URL, then save and upload the file as usual.
Ready to get your wiki content into clean Markdown? Try the free document to Markdown converter.
The Markdown Memo
A fortnightly note for lawyers, researchers, accountants, and anyone else drowning in PDFs, scans, and decks. No spam.