Koder Document Format
A lightweight, expressive document format where every symbol looks like what it does. Built for clarity, power, and self-sufficiency.
KOD is designed from the ground up around these ideas.
Every markup symbol visually resembles its effect. / slants like italic. _ sits under text like an underline. - strikes through like deleted.
The fewest characters possible for each operation. Bold is *text* not **text**. Strikethrough is -text- not ~~text~~.
No dependency on HTML or external formats. Native support for alignment, tables with widths, headers/footers, variables, includes, and more.
Same simplicity. More power. Better mnemonics.
| Feature | KOD | Markdown |
|---|---|---|
| Bold | *text* — single char |
**text** |
| Italic | /text/ — slanted |
*text* — overloaded |
| Underline | _text_ native |
not supported |
| Strikethrough | -text- native |
~~text~~ GFM only |
| Highlight | =text= native |
not supported |
| Text Alignment | >> >< <> |
not supported |
| Table Column Widths | [30%] [200px] [*] |
not supported |
| Cell Merging | || colspan, ::: rowspan |
not supported |
| Video / Audio | ! !~[](aud) |
not supported |
| Variables | {!name="val"!} {name} |
not supported |
| File Includes | {{file.kd}} |
not supported |
| Comments | // and /* */ |
<!-- --> HTML |
| Admonitions | !!! type native |
extension only |
| Columns Layout | ::: columns N |
not supported |
| Header / Footer | ---header--- / ---footer--- |
not supported |
A complete document format with native support for features that other formats lack.
Every symbol looks like what it does. Slash / slants for italic. Underscore _ underlines. Asterisk * is dense for bold. Hyphen - strikes through.
Right-align with >>, center with ><, justify with <>. The symbols point where the text goes.
Column widths [30%], row heights [h:50px], vertical alignment, colspan ||, rowspan :::. Real tables, not basic grids.
Native video with ! and audio with !~[](url). With optional dimensions and alignment, just like images.
Define variables with {!name="val"!} and reuse with {name}. Include other files with {{file.kd}}. DRY documents.
C-style comments with // and /* */. Add notes to your source that never appear in output. No HTML hacks needed.
Define document headers and footers with ---header---. Use automatic variables like {page}, {date}, {title}.
Multi-column layouts with ::: columns N and custom widths [60%|40%]. Native column support without any CSS.
Seven callout types: note, tip, warn, error, success, info, quote. With optional custom titles.
KOD source on the left, rendered output on the right.
This is a bold statement with italic emphasis and underlined terms. Some data is no longer valid and other is highlighted.
Centered Title
| Product | Qty | Total |
|---|---|---|
| Laptop | 5 | 17,500.00 |
| Mouse | 10 | 899.00 |
| Subtotal | 18,399.00 | |
dashboard.png (600×300)
Product Demo
video — example.com/demo.mp4
Podcast Episode
audio — example.com/ep1.mp3
💡 Pro Tip
KOD uses visual mnemonics — each symbol looks like its effect.
Stable v1.0
The parser uses a two-pass approach:
Everything KOD offers, in one compact table.
| Element | Syntax | Description |
|---|---|---|
| Inline Formatting | ||
| Bold | *text* | Dense asterisk — strong emphasis |
| Italic | /text/ | Slanted slash — italic tilt |
| Strikethrough | -text- | Horizontal line through text |
| Underline | _text_ | Line sits under text |
| Highlight | =text= | Thick bar — marker highlight |
| Inline Code | `text` | Standard backtick convention |
| Blink | @@text@@ | Eye-catching effect |
| Superscript | ^text^ | Caret points up |
| Subscript | ~text~ | Tilde dips down |
| Block Alignment | ||
| Right | >> text | Pushes text to the right |
| Center | >< text | Squeezes text to center |
| Justify | <> text | Stretches text to both edges |
| Structure | ||
| Headings | # H1 ... ###### H6 | Six heading levels |
| Unordered List | - item | Dash prefix |
| Ordered List | 1. item | Number prefix |
| Task List | [ ] / [x] item | Checkbox items |
| Definition List | Term + : Definition | Term followed by colon-prefixed definition |
| Blockquote | > text | Standard quote block |
| Horizontal Rule | --- | Three or more hyphens |
| Page Break | === | Three or more equals |
| Links & Media | ||
| Link | [text](url) | Inline hyperlink |
| Image |  | With optional dimensions & alignment |
| Video | ! | Double bang for video |
| Audio | !~[alt](url) | Tilde as sound wave |
| Tables | ||
| Basic Table | | col | col | | Pipe-delimited columns |
| Column Width | [30%] [200px] [*] | In header row |
| Row Height | [h:50px] | At end of row |
| Vertical Align | ^top =mid _bottom | Cell content prefix |
| Colspan | || | Double pipe merges columns |
| Rowspan | ::: | Merges with cell above |
| Advanced | ||
| Front Matter | --- yaml --- | YAML metadata block |
| Code Block | ```lang | With line numbers, highlighting, title |
| Comment | // or /* */ | C-style, stripped from output |
| Footnote | [^id] | Reference + definition at bottom |
| Admonition | !!! type "Title" | note, tip, warn, error, success, info, quote |
| Collapsible | +++ summary | Expandable section |
| Columns | ::: columns N | Multi-column layout |
| Badge | [!badge color "text"] | Colored inline badge |
| Variable Def | {!name = "val"!} | Define reusable variable |
| Variable Use | {name} | Insert variable value |
| Include | {{file.kd}} | Include another KOD file |
| Math (inline) | $expr$ | LaTeX math expression |
| Math (block) | $$expr$$ | Displayed math equation |
| Diagram | ```diagram type=X | flowchart, sequence, graph, gantt, pie |
| TOC | [TOC] | Auto table of contents |
| Header/Footer | ---header--- | Document header/footer regions |
| Raw HTML | {{{ html ... }}} | Pass-through HTML block |
| Escape | \char | Literal delimiter character |
KOD integrates with the tools you already use.
The complete format specification, examples, and test suite. Open source under MIT license.
flow.koder.dev/Koder/koder-kod/SPEC.kdA dedicated editor for KOD documents with live preview, syntax highlighting, and export to HTML/PDF.
flow.koder.dev/Koder/koder-kedThe Koder code hosting platform. Browse, clone, and contribute to all Koder projects.
flow.koder.dev