Skip to content

DokuWiki Syntax

The AI assistant automatically generates correct DokuWiki syntax. You don’t need to memorize it - but it helps to verify the output. The validate_content tool catches syntax errors before a page is saved.

The key differences at a glance:

Element Markdown DokuWiki
Bold **text** or __text__ **text**
Italic *text* or _text_ //text//
Code `code` ''code''
Underline - __text__
Strikethrough ~~text~~ <del>text</del>
Heading ## Title ===== Title =====
Link [Text](url) `[[url
Image ![alt](image.png) `{{image.png
List * item * item (2 spaces)
Namespace path/page path:page
Line break 2 spaces + newline \\
italic//
**bold**
__underline__
''code''
<del>deleted</del>
H<sub>2</sub>O and E=mc<sup>2</sup>
**__//''combined formatting''//__**
**bold** //italic// __underline__ ''code''
<del>deleted</del>
H<sub>2</sub>O

DokuWiki uses = on both sides. Markdown uses them only on the left.

====== Level 1 ======
===== Level 2 =====
==== Level 3 ====
=== Level 4 ===
== Level 5 ==

Important: Every list item starts with exactly 2 spaces. Each additional level gets 2 more spaces.

* Unordered list, item 1
* Item 2
* Sub-item (4 spaces total)
* Back to level 1
- Ordered list
- Second item
- Sub-item
* Mixed
- Ordered sub-item
* Back to unordered
* Item
* Sub-item
[[page]]
[[page|Link Text]]
[[namespace:page]]
[[namespace:subnamespace:page]]
[[#anchor|Link to section on same page]]
[[page#anchor|Link to section on other page]]
http://example.com
[[http://example.com]]
[[http://example.com|Link Text]]
<email@example.com>
{{image.png}} Original size
{{image.png?200}} Width: 200px
{{image.png?200x50}} Width x Height
{{namespace:image.png}} With namespace
{{https://example.com/image.png}} External image

The position of spaces inside {{ }} controls alignment:

{{ image.png}} right-aligned
{{image.png }} left-aligned
{{ image.png }} centered
{{ image.png |This is the caption}}
{{wiki:logo.png?200|Company logo}}

^ marks header cells, | marks data cells. Every line must start and end with a delimiter.

^ Header 1 ^ Header 2 ^ Header 3 ^
| Cell 1 | Cell 2 | Cell 3 |
| Cell 4 | Cell 5 | Cell 6 |

Two consecutive | at the end merge cells:

^ Header 1 ^ Header 2 ^ Header 3 ^
| Cell | Spans across 2 columns ||

::: in a cell inherits the content from the cell above:

^ Header 1 ^ Header 2 ^
| Cell | Vertical |
| Cell | ::: |
| right| centered |left |
  • 2+ spaces on the left = right-aligned
  • 2+ spaces on the right = left-aligned
  • 2+ spaces on both sides = centered
This is ''inline code'' in the text.
<code javascript>
function hello() {
console.log("Hello World");
}
</code>
<file php example.php>
<?php echo "Hello World!"; ?>
</file>

Supported languages: javascript, php, python, bash, java, css, html, sql, xml, yaml, json and over 200 more.

> First quote level
>> Second quote level
>>> Third quote level

Four or more dashes:

----
Text with a footnote((This is the footnote content)).
<nowiki>**This will not be bold**</nowiki>
%%//This will not be italic//%%
~~NOTOC~~ Suppress table of contents
~~NOCACHE~~ Force page re-rendering
{{tag>keyword1 keyword2}}
====== Project Documentation ======
**Last updated:** 2025-10-15
===== Overview =====
This is the //main documentation// with **important** information.
===== Requirements =====
* Functional requirements
* User authentication
* Data validation
* Technical requirements
- Performance targets
- Security standards
===== Architecture =====
==== System Components ====
^ Component ^ Technology ^ Status ^
| Frontend | React | Complete |
| Backend | Node.js | In Progress |
==== Code Example ====
<code javascript>
const config = {
apiUrl: 'https://api.example.com',
timeout: 5000
};
</code>
===== External Resources =====
* [[https://example.com|Official Documentation]]
* [[related:page|Related Internal Page]]
{{tag>project documentation 2025}}
Error Wrong Correct
Italic *text* //text//
Code `code` ''code''
Heading ### Title ==== Title ====
Link [Text](url) `[[url
Image ![alt](image) `{{image
List without indent * item * item
Namespace with / wiki/page wiki:page
Line break 2 spaces \\

See also Common Errors for API and connection issues.