What is Atlassian Document Format (ADF)? A guide for Markdown users
Updated 2 December 2026 ยท 8 min read
Short answer: Atlassian Document Format (ADF) is the JSON format that Atlassian Cloud products use to represent rich text. A document is a tree: a root doc node with version 1, block nodes such as paragraph, heading and table, inline text nodes, and marks such as strong and link. Confluence's older storage format is XHTML-based, and wiki markup is the legacy text syntax. In Confluence Cloud REST API v2 you read or write ADF as atlas_doc_format, passed as a JSON-encoded string.
What is Atlassian Document Format?
Atlassian Document Format is a JSON schema for rich text. Atlassian's ADF structure reference describes it as the format for rich text stored in Atlassian products: Jira Cloud stores issue comments and textarea custom fields as ADF. Confluence Cloud's REST API returns and accepts page bodies as ADF too, under the atlas_doc_format name.
Every ADF document starts with a root node. It needs version (currently 1), type set to doc, and a content array. An empty array is a valid empty document.
Everything below the root is a node. Block nodes define structure, for example paragraph, heading, bulletList, table, panel and codeBlock. Inline nodes sit inside blocks and hold content, for example text, mention, emoji, date, status and inlineCard. Each node has a required type, an optional attrs object for details such as a heading level or a code block's language, and a content array when it holds children.
Marks are formatting attached to a node, most often a text node. The text node accepts strong, em, code, strike, underline, link, subsup and textColor. The smallest useful document, from Atlassian's reference, is one paragraph with a bold word:
{
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{ "type": "text", "text": "Hello " },
{ "type": "text", "text": "world", "marks": [{ "type": "strong" }] }
]
}
]
}
In Markdown that is Hello **world**. Atlassian also publishes a JSON schema for ADF (the structure page links it as go.atlassian.com/adf-json-schema) and warns that the schema may include nodes and marks that are not valid in a given product.
How does ADF map to Markdown?
Markdown is text with light punctuation. ADF is an explicit tree, so the same content is much longer. In a small test page (a heading, one sentence with a bold word and a link, a three-item list and a one-line code block), the Markdown is 191 characters and the minified ADF is 899. Pages returned by Confluence can carry extra attributes, such as the localId on task lists, so real pages can be larger still.
| Markdown | ADF node or mark | Notes |
|---|---|---|
## Heading | heading with attrs.level | Level is 1 to 6. |
| Paragraph text | paragraph with text children | Empty text nodes are not allowed. |
**bold**, *italic* | strong, em marks | Marks sit on the text node. |
[label](url) | link mark with attrs.href | The target is a URL, not a file path. |
- item, 1. item | bulletList or orderedList with listItem children | Each item holds a paragraph. |
- [ ] task | taskList and taskItem | Items carry a localId and a state of TODO or DONE. |
| Fenced code block | codeBlock with attrs.language | Children are plain text nodes without marks. |
| GFM table | table, tableRow, tableHeader, tableCell | Rows hold cells, cells hold blocks. |
> [!NOTE] alert | panel with attrs.panelType | Types are info, note, warning, success, error. |
<details> | expand with attrs.title | Confluence's expand macro. |
| No equivalent | mention, status, date, layouts, macros (extension) | These degrade to text or placeholders in Markdown. |
Converting ADF to Markdown always loses something. Atlassian's experimental adf-builder-java-markdown module documents the same trade-off: a panel becomes a blockquote with a bold label, an extension becomes a plain-text placeholder, and text colors and alignment are dropped.
How is ADF different from storage format and wiki markup?
Confluence has had three body formats over its history. They are not interchangeable, and the REST API names them differently.
| Format | Syntax | Where you meet it | REST v2 name |
|---|---|---|---|
| ADF | JSON tree of nodes and marks, validated by a schema | Rich text across Atlassian Cloud; the format to target for new tooling | atlas_doc_format |
| Storage format | XHTML-based XML with ac: and ri: elements for macros, links and resources | Older scripts, macros and tutorials | storage |
| Wiki markup | Plain text such as h2. Title and *bold* | Legacy; v2 still accepts it on write | wiki (write only) |
Atlassian's storage format documentation says the format is XHTML-based but does not comply with the XHTML definition, and uses ac: elements for macros, links and task lists plus ri: identifiers that point at pages and attachments. That has one practical consequence for converters: in storage format an internal link can name a page by title, while in ADF a link is a URL.
How do you read and write ADF with Confluence REST API v2?
Confluence Cloud REST API v2 lives under /wiki/api/v2. The format is a query parameter on read and a field on write. The details below come from Atlassian's Pages API reference and its OpenAPI spec as of December 2026.
- Read one page:
GET /wiki/api/v2/pages/{id}?body-format=atlas_doc_formatreturns the ADF underbody.atlas_doc_format.value. Single-page reads acceptstorage,atlas_doc_format,view,export_view,anonymous_export_view,styled_viewandeditor. - Read many pages: endpoints that list pages, such as the pages in a space, accept only
storageandatlas_doc_format. - Create:
POST /wiki/api/v2/pagesneedsspaceId. It takestitle, an optionalparentId(without one, the page goes under the space homepage) and abodywithrepresentationandvalue. - Update:
PUT /wiki/api/v2/pages/{id}requiresid,status,title,bodyand aversion.numberequal to the current version plus one.
The value field is a string, so ADF travels as JSON inside JSON. When you read a page, decode the response and then parse body.atlas_doc_format.value a second time. An illustrative create call:
curl -X POST "https://your-site.atlassian.net/wiki/api/v2/pages" \
-u "[email protected]:$CONF_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"spaceId": "12345",
"status": "current",
"title": "Hello ADF",
"body": {
"representation": "atlas_doc_format",
"value": "{\"version\":1,\"type\":\"doc\",\"content\":[{\"type\":\"paragraph\",\"content\":[{\"type\":\"text\",\"text\":\"Hello world\"}]}]}"
}
}'
Page titles must be unique within a space, so a create call with an existing title fails. The older v1 API also has asynchronous body conversion (/wiki/rest/api/contentbody/convert/async/{to}) between ADF, storage format, the editor format and rendered views. Results are kept for five minutes, and Markdown is not one of the formats.
Why does Confluence reject my ADF? Common validation errors
Atlassian does not publish a catalog of ADF validation messages that this guide could find. The causes below come from the node and mark reference pages and from developer community reports.
- The value is an object, not a string. The API schema defines
valueas a string, and developer forum threads show a 400 response when the ADF is sent as a nested object instead of JSON-encoded text. - The root is incomplete. The root needs
version,type: "doc"andcontent. - Empty text nodes. The text node reference says
textmust not be empty. A converter that turns blank lines into empty text nodes produces invalid documents. - Invalid mark combinations. The code mark can only be combined with
link, so bold inline code is rejected. - Wrong children. A
codeBlocktakes text nodes without marks. Apaneltakes paragraphs, headings, lists, code blocks, task lists and rules, but not tables. AtabletakestableRownodes, and one developer report of "Error converting ADF to storage format" traced back totableRowcontent that was a single object instead of an array. - A node from another product. Not every node works in every Atlassian product. Test in the product where the page will live.
The fastest debugging method is to build the same content in the Confluence editor, fetch its ADF through the API, and diff it against yours.
How do Markdown tools produce valid ADF?
Reliable converters parse Markdown into a syntax tree, map each tree node to an ADF node, and sanitize the result before sending it. They never assemble JSON from strings. The checks that matter are the ones above: drop empty text, restrict marks to valid combinations, and put the right children inside panels, code blocks and tables.
Folio for Confluence follows this approach on import. It converts headings, GFM tables, fenced code blocks with a language, nested lists, task lists, GitHub-style alerts (to panels) and <details> blocks (to expand macros) into native ADF, and it sanitizes inline marks to valid combinations. On export it reverses the mapping, as described in the Folio docs. Folio works on Confluence Cloud only, and Markdown images import as [Image: alt] placeholders.
FAQ
Does the Confluence Cloud REST API return Markdown?
No. Page bodies come back as storage format, ADF, or rendered HTML views. Atlassian's content body conversion API converts between those formats and has no Markdown target. As of December 2026, Confluence is rolling out a native single-page Markdown export in the page menu, which began in mid 2026, and Atlassian publishes an experimental Java module that converts ADF to Markdown.
Where is the official ADF JSON schema?
Atlassian links its ADF JSON schema from the ADF structure page on developer.atlassian.com, at go.atlassian.com/adf-json-schema. Any JSON Schema validator can check a document against it. Atlassian notes that the schema can include nodes and marks that are not valid in a given product, so a document that passes can still be rejected.
Is ADF in Jira the same as ADF in Confluence?
They share one core format, but not every node and mark works in every product. Jira Cloud stores issue comments and textarea fields as ADF, while Confluence adds nodes for its own layouts, macros and page features. Test any generated document in the product where it will be used.
Can I still use storage format with Confluence Cloud?
Yes. REST API v2 still reads and writes storage format, and the older v1 API can convert storage format to ADF and back. ADF is the better target for new tooling because it is JSON with a published schema, but existing storage-format scripts keep working.