# Nested and mixed lists in Confluence storage format

URL: https://goingstellar.ro/reference/confluence-storage-format/nested-lists/

A nested list is a ul or ol placed inside the li of its parent, after the item text. Bullets can sit under numbers and the other way round. Lists inside table cells use the same markup and survive the ADF round trip.

## Storage format

```xml
<ul>
<li>a
<ul>
<li>nested</li>
</ul>
</li>
</ul>
<ol><li>one<ul><li>bullet under number</li></ul></li></ol>
```

## As ADF (Confluence Cloud)

The ADF that Confluence Cloud builds for:

```xml
<ul><li>a<ul><li>nested</li></ul></li></ul>
```

```json
{
 "type": "doc",
 "content": [
  {
   "type": "bulletList",
   "content": [
    {
     "type": "listItem",
     "content": [
      {
       "type": "paragraph",
       "content": [
        {
         "text": "a",
         "type": "text"
        }
       ]
      },
      {
       "type": "bulletList",
       "content": [
        {
         "type": "listItem",
         "content": [
          {
           "type": "paragraph",
           "content": [
            {
             "text": "nested",
             "type": "text"
            }
           ]
          }
         ]
        }
       ]
      }
     ]
    }
   ]
  }
 ],
 "version": 1
}
```

## Examples

Storage format sent:

```xml
<ul><li>a<ul><li>nested</li></ul></li></ul>
```

A bullet list with one sub-item, to show where the child list goes.

Rendered view (HTML):

```html
<ul><li>a<ul><li>nested</li></ul></li></ul>
```

Storage format after the round trip through ADF:

```xml
<ul><li><p>a</p><ul><li><p>nested</p></li></ul></li></ul>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<ol><li>one<ul><li>bullet under number</li></ul></li></ol>
```

Bullets under a numbered item, a mix that appears in procedures.

Rendered view (HTML):

```html
<ol><li>one<ul><li>bullet under number</li></ul></li></ol>
```

Storage format after the round trip through ADF:

```xml
<ol start="1"><li><p>one</p><ul><li><p>bullet under number</p></li></ul></li></ol>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<table><tbody><tr><td><ul><li>list in cell</li></ul><p>para</p></td></tr></tbody></table>
```

A list inside a table cell followed by a paragraph in the same cell.

Rendered view (HTML):

```html
<div class="table-wrap"><table class="confluenceTable"><tbody><tr><td class="confluenceTd"><ul><li>list in cell</li></ul><p>para</p></td></tr></tbody></table></div>
```

Storage format after the round trip through ADF:

```xml
<table data-layout="default"><tbody><tr><td><ul><li><p>list in cell</p></li></ul><p>para</p></td></tr></tbody></table>
```

Sent to Confluence Cloud on 29 Nov 2026.

## What changes in conversion

- The child list stays inside its parent li after an ADF save. The parent text gets its own paragraph and the child list follows it in the same li.
- Mixing list types is lossless in this test: the ol with a ul child returns as an ol, with start="1" added, holding a ul child.
- Inside a table cell the list is kept, the table gains data-layout="default", and the item text is wrapped in a paragraph as it is outside tables.

## Pitfalls

- The parent text gets wrapped in a paragraph after an editor save, so a pattern that matches li, text and ul in a row stops matching.
- Only one level of nesting was tested. Deeper levels follow the same shape but were not run.
- A list in a table cell is stored with the table, and the table gains data-layout on save, so a script that compares the table markup sees a change.

## Related

- [<ul> and <ol> lists](https://goingstellar.ro/reference/confluence-storage-format/bullet-numbered-lists/)
- [<ac:task-list> task lists](https://goingstellar.ro/reference/confluence-storage-format/task-lists/)
- [Lists, paragraphs and tables in cells](https://goingstellar.ro/reference/confluence-storage-format/content-in-cells/)
- [Tables](https://goingstellar.ro/reference/confluence-storage-format/tables/)

## Sources

- [Confluence storage format (Atlassian Documentation)](https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html)
- [Atlassian Document Format: document structure (Atlassian Developer)](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)

