Markdown cheatsheet · Checkboxes

Markdown checkboxes (task lists)

A checkbox is a list item that starts with [ ] for to-do or [x] for done. That's the whole syntax.

The syntax

You type
- [x] Write the draft
- [ ] Review it
- [ ] Publish
You get
  • Write the draft
  • Review it
  • Publish
The space inside the brackets is required. An open task is [ ] with a space, not []. And the line must start like a list item: - [ ] task, dash first.

Nested subtasks

Task lists nest like any other list: indent the subtasks by two spaces.

You type
- [ ] Ship v1.0
  - [x] Fix the last bug
  - [ ] Write release notes
You get
  • Ship v1.0
  • Fix the last bug
  • Write release notes

Where it works

Task lists aren't part of original markdown; they come from GitHub Flavored Markdown (GFM). By now they work in nearly every place you'd write markdown: GitHub and GitLab (issues, PRs, README files), Obsidian, Notion, Discord, and editors like maxdown. The main holdouts are minimal, strictly CommonMark renderers, where the brackets just show as text.

Whether the rendered checkbox is clickable depends on the app. On GitHub, ticking a box edits the underlying markdown. In maxdown, clicking a checkbox in the preview flips [ ] to [x] in the file, so your notes double as working to-do lists.

Checkboxes in a table cell

This is the one people search for most, and the answer is a firm no with a workaround. Task list syntax only works inside a list: the - [ ] has to start a list item. A table cell isn't a list, so [ ] in a cell renders as literal brackets.

The workaround is to fake the box with an emoji or an HTML checkbox. Neither is clickable, but they read correctly.

You type
| Task   | Done |
| ------ | ---- |
| Draft  | ✅   |
| Review | ⬜   |
You get
TaskDone
Draft
Review

Where inline HTML is allowed, <input type="checkbox" checked> in a cell renders a real (but disabled) box. On GitHub the emoji is more reliable and travels further. If you need boxes you can actually tick, the content wants to be a list, not a table.

Common questions

Uppercase or lowercase x?

Both [x] and [X] count as checked in GFM. Lowercase is the convention.

Can I put a checkbox in a heading?

No; like tables, headings aren't lists, so task syntax doesn't apply. An emoji is the only way to get the look.

Related syntax

· All markdown guides

Less syntax. More writing.

Download maxdown

Free · no account · macOS, Windows & Linux