Markdown task lists: - [ ] and - [x] explained
Bobby Huang ·
A Markdown task list is a list where items start with a box. Write "- [ ] task" for an open item and "- [x] task" for a done one. Put a space inside the brackets for an open box and a space after the closing bracket. Task lists come from an extension, so a viewer that supports it shows real check boxes. Tools without it show the brackets as plain text. To tick a box, change the space to an x.
Key takeaways
- An open task is "- [ ]" and a done one is "- [x]". Both need a list marker, a space, the box, and another space.
- Task lists are an extension. Without support for it, the brackets show as text, but the file still reads fine.
- Ticking a box changes one character in the file, from a space to an x.
- You can nest tasks and use them in numbered lists. Indent a child by two spaces under `- [ ] `, or three under `1. [ ] `.
- A one-line grep counts open and done tasks, which is handy for long agent plans.
Task lists are the part of Markdown that turns a file into a to-do list. You will see them in project notes, release checklists, and in many plans that AI agents write.
This page explains the syntax, the common mistakes, and how to read and tick task lists in practice. For every other element, see the Markdown syntax guide.
The syntax
A task is a list item that starts with a box:
- [ ] Write the release notes
- [x] Update the version number
Result:
- Write the release notes
- Update the version number
Each task has four parts, in this order:
- A list marker:
-,*or+, or a number like1. - One space.
- The box:
[ ]for open,[x]for done. The open box needs whitespace inside. Use a space. - One space, then the task text.
The task list extension also accepts an uppercase [X] as done.
Why a box does not render
If you see [ ] as text instead of a check box, the cause is usually one of these:
| You wrote | Problem | Fix |
|---|---|---|
[ ] Task |
No list marker | - [ ] Task |
-[ ] Task |
No space after the marker | - [ ] Task |
- [] Task |
Nothing inside the box | - [ ] Task |
- [ ]Task |
No space after the box | - [ ] Task |
- [v] Task |
Only whitespace, x or X counts | - [x] Task |
If the syntax is right and the box still shows as text, the tool you are using does not support the task list extension. The file is fine. Open it in a viewer that supports task lists.
Nested tasks
Indent a child task by two spaces under - [ ] , so its - sits under the parent's box. Use three spaces under 1. [ ] .
- [ ] Ship the settings page
- [x] Build the form
- [ ] Add validation
- [ ] Write tests
- [ ] Update the docs
Result:
- Ship the settings page
- Build the form
- Add validation
- Write tests
- Update the docs
A ticked child does not tick its parent. Each box is separate. If you want the parent done only when every child is done, you tick it yourself.
Numbered task lists
Put the box after the number:
1. [x] Back up the database
2. [ ] Run the migration
3. [ ] Check the row counts
This is useful when order matters, such as steps in a plan.
How to tick a box
- Open the Markdown file in a plain text editor.
- Change the space inside the task's
[ ]tox, making[x]. - Save the file, then check it in a viewer with task list support.
That changes one character, so it makes a small diff. Some rendered editors also let you click a box and save the change. Many web pages show boxes you cannot click.
A good habit when you review someone else's list, or an agent's: tick a box when you have checked the work, not when the list says it is done. That keeps the list honest.
Count open and done tasks from the terminal
Long plans can have dozens of tasks. A quick count tells you where things stand before you read anything. These commands work in the macOS and Linux terminal.
Count open tasks:
grep -cE '^[[:space:]]*[-*+] \[ \]' plan.md
Count done tasks:
grep -cE '^[[:space:]]*[-*+] \[[xX]\]' plan.md
List open tasks with their line numbers, including numbered ones:
grep -nE '^[[:space:]]*([-*+]|[0-9]+[.)]) \[ \]' plan.md
The counts include nested tasks. The first two commands skip numbered task lists; the third one includes them. They are quick checks, not a parser. They also count lines inside code blocks and lines like - [ ]Task that do not render as tasks.
Task lists in AI agent plans
Coding agents often write their plans as task lists. Each step is a box, and the agent ticks steps as it goes. That makes the plan easy to scan. It also means the file changes while you read it.
Two tips for reviewing these plans:
- Read the open tasks first. They tell you what is left and where the agent might need you.
- Treat a ticked box as a claim. Check the result before you trust it.
The guide on reading a Claude Code plan file walks through a full review, and how to review the Markdown your AI agents write covers the wider loop.
A few ticking rules for your agent help keep each box matched to real work.
Where Sashmark fits
Sashmark is a Markdown reader and editor for people whose AI agents write Markdown. It is in development; nothing has been released. There are no AI features in the app.
Questions
- Why is my Markdown check box not showing?
- Check three things. The item needs a list marker such as "- " before the box. The box needs a space or an x inside it, so "[]" will not work. And there must be whitespace, usually a space, after the closing bracket. If all three are right, your viewer may not support the task list extension.
- Does an uppercase X work?
- Yes. The task list extension accepts "[x]" and "[X]" as done. Lowercase is more common, so pick one and keep it.
- Can I click a check box to tick it?
- It depends on the tool. Some editors and code hosts let you click the box and save the change to the file. Many web pages show the box but do not let you click it. In a plain text editor, change the space to an x yourself.
- Can a task list be numbered?
- Yes. "1. [ ] First step" works with the task list extension. The box comes after the number and its period.