Markdown to DocBook
Convert markdown to docbook with pandoc. Runs entirely on your device.
Runs on your device. The file is never uploaded.
Markdown to DocBook writes DocBook section elements from a Markdown file, tables becoming DocBook tables and fenced code becoming a program listing. The download takes a .dbk extension, which plenty of toolchains want renamed to .xml. The writer is DocBook 4, and no DocBook 5 setting exists, because pandoc is handed no options.
Questions
Is the output a complete DocBook document?
No. Pandoc runs without its standalone option, so you get the section elements only, with no XML declaration and no article or book wrapper around them. Paste the result inside your own document element. That is usually what you want when you are adding a chapter to an existing DocBook set.
Which DocBook version is this?
Pandoc's docbook writer, which is DocBook 4. There is no DocBook 5 option on this page, because the tool passes pandoc no options at all. If you need DocBook 5, convert here and adjust the namespace and the few renamed elements afterwards.
Why is the file named .dbk?
Because that is the extension this tool assigns for DocBook output, so manual.md comes back as manual.dbk. Many DocBook toolchains expect .xml instead. Rename the file after downloading if yours does; nothing inside the file depends on the extension. The converted XML is shown on the page before you download it, so you can check that the element nesting and the section levels came out the way your toolchain expects.
What happens to tables, code blocks and images?
Tables become DocBook tables, fenced code becomes a program listing, and image links become image references carrying the same path your Markdown used. No image data is read, because the tool hands pandoc only the text of your document. Nothing is read from disk and nothing is fetched over the network, so an image reference only works once the picture file sits where the path says it does.
How do I go from DocBook back to Markdown?
Use DocBook to Markdown. Bear in mind it reads the single file you drop, so a document assembled from XIncludes or external entities needs flattening first. Both directions run in a Web Worker in this tab with nothing uploaded. The file you download from this page is your Markdown name with .dbk in place of .md, and the DocBook to Markdown tool names its own result with .md the same way.