How to create nested and indented lists in markdown. Sub-bullets, mixed ordered and unordered lists, and indentation rules.
Nested lists are created by indenting list items with 2–4 spaces (or a tab). You can nest unordered lists inside ordered lists and vice versa. The level of indentation determines the depth of nesting.
Indent with 2 spaces (or 4) to create a sub-list.
Ordered sub-lists use 3 spaces of indentation (to align after the number and period).
Mix ordered and unordered lists at different nesting levels.
| Platform | Supported | Notes |
|---|---|---|
| GitHub | Yes | — |
| GitLab | Yes | — |
| Discord | Yes | — |
| Slack | Yes | — |
| Notion | Yes | — |
| Obsidian | Yes | — |
- Item - Sub-item (no indent)
- Item - Sub-item (2 spaces)
Without indentation, both items appear at the same level. You must indent to create a nested list.
Mixing tabs and spaces
Use consistent 2-space or 4-space indentation
Mixing tabs and spaces causes inconsistent rendering across parsers. Pick one and stick to it.
More than three levels of nesting is hard to read. Restructure with headings or separate lists if you find yourself going deeper.
GitHub and most modern parsers accept 2-space indentation. Older parsers (Python-Markdown) require 4 spaces. For safety, use 4.
Everything you need to know.
Add 2 spaces (or 4) before the - or number on the sub-list item. For ordered lists, align the sub-list with the first character after the number and period.
Bullet lists (unordered lists) in markdown start each item with a dash (-), asterisk (*), or plus sign (+) followed by a space. They're the most common way to present non-sequential items, features, or options.
Numbered lists (ordered lists) in markdown start each item with a number followed by a period and a space (1. ). Markdown auto-numbers the output regardless of the numbers you type — all items could be "1." and the rendered list would still count correctly.
Task lists (also called checklists or to-do lists) are a GitHub Flavored Markdown extension that renders interactive checkboxes. An unchecked item uses - [ ] and a checked item uses - [x]. On GitHub, the checkboxes are clickable in issues and pull requests.
Paste your markdown and see nested list rendered instantly with professional themes.