Checkboxes and Task Lists in Markdown
A list item that starts with [ ] becomes an empty checkbox, and one that starts with [x] a ticked one. This guide covers task list syntax, the mistakes that break it, and which apps let you click the boxes.
Quick answer
How do you make a checkbox in Markdown?
Write a list item with square brackets after the marker: - [ ] task for an empty checkbox and - [x] task for a ticked one. Task lists come from GitHub Flavored Markdown and work on GitHub, GitLab, Obsidian and most editors.
- [x] Pick a title
- [ ] Write the draft
- [ ] Ask for a reviewResult
- Pick a title
- Write the draft
- Ask for a review
Task list syntax and examples
A task is an ordinary list item with brackets at the start, so everything that works in lists works here too.
Empty and ticked boxes
Put a space between the brackets for an open task and an x for a done one. An uppercase X works too.
- [ ] Open task
- [x] Done task
- [X] Also doneResult
- Open task
- Done task
- Also done
Numbered tasks
Brackets work after numbers as well, for steps that must happen in order.
1. [x] Back up the database
2. [ ] Run the migration
3. [ ] Check the logsResult
- Back up the database
- Run the migration
- Check the logs
Nested tasks
Indent a task under another to split it into smaller steps.
- [ ] Launch the new site
- [x] Write the release notes
- [ ] Update the screenshotsResult
- Launch the new site
- Write the release notes
- Update the screenshots
With formatting and links
The text after the brackets can hold bold text, links and strikethrough.
- [x] ~~Fix the login bug~~
- [ ] Review [the pull request](https://example.com/pull/42)
- [ ] **Release** version 2.0Result
-
Fix the login bug - Review the pull request
- Release version 2.0
Mistakes that break a checkbox
The brackets need a space or an x inside, a space must follow them, and the line must be a list item.
- [] Empty brackets
- [x]No space after the bracket
[ ] No list markerResult
- [] Empty brackets
- [x]No space after the bracket
[ ] No list marker
GitLab: tasks that no longer apply
GitLab adds a third state, [~], for tasks that no longer apply.
- [x] Write the code
- [~] Translate the docs
- [ ] Ship itGitLab only. Other Markdown apps display this differently, so there is no preview.
Checkboxes in popular apps
Every app that follows GitHub Flavored Markdown shows the boxes. Whether you can click them depends on the app and the page.
| App | Support | Notes |
|---|---|---|
| GitHub | Supported | Boxes in issues, pull requests and comments can be clicked; in files they are read-only. |
| GitLab | Supported | Clickable in issues and merge requests. [~] marks a task that no longer applies. |
| Obsidian | Supported | Boxes can be clicked in reading view and live preview. |
| Notion | Differs | Typing [] makes a to-do block. |
| Discord | Not supported | Brackets are shown as typed. |
| Slack | Not supported | Messages have no checkboxes. |
Questions and answers
Why isn't my checkbox showing?
- , that the brackets hold a space or an x ([] does not work), that a space follows the ], and that the app supports GitHub Flavored Markdown.Can I click the checkboxes?
Can I use an uppercase X?
[X] and [x] both mark a task as done.Can tasks be nested or numbered?
1. [ ] for a numbered task.How do I add a checkbox outside a list?
Do checkboxes work in Notion, Discord or Slack?
[]. Discord and Slack have no checkboxes and show the brackets as typed.How does GitHub count tasks?
What HTML does a task list produce?
<input type="checkbox" disabled>, with checked added for done tasks.