Heading outline and table of contents builder
Paste Markdown or HTML to see its headings, get an anchor for each, copy a ready-made table of contents and read warnings about skipped levels.
Pasted text stays in your browser.
Paste a page above to see its headings.
What the tool does
Paste the Markdown or HTML of a page and the tool lists its headings in order with their level, builds an anchor for each one, and writes a table of contents in Markdown and in HTML that you can paste back in. It also reads the structure for problems and lists them. Pasted text stays in your browser.
How the input is read
Markdown follows the CommonMark rules. A heading can be written with leading hash marks (ATX style) or as a line of text underlined with equals signs for a level-one heading or hyphens for level two (setext style). Hash marks inside a fenced code block, written with backticks or tildes, are code and never headings. A block of front matter at the top of the file is skipped, and closing hash marks on a heading line are not part of its text. Links, code spans and emphasis inside a heading are reduced to their plain text.
HTML is read by the browser itself. The tool hands your text to the browser's DOMParser, which builds an inert document in which scripts do not run, then collects the h1 to h6 elements in document order. It never searches the text with a pattern, so headings inside comments, scripts or attributes are not mistaken for real ones, and whitespace inside a heading is collapsed.
Anchors
Each anchor follows the same rule as the slug generator: accents are folded, every run of other characters becomes one hyphen, and the result is lower case. Letters of other scripts, such as Greek or Hindi, are kept so those headings keep their own anchors. When two headings produce the same anchor, the second gets -1 and the third -2, in order, and a suffix is never reused. An empty heading gets no anchor and no line in the table of contents.
The warnings
| Warning | When it appears | Why it matters |
|---|---|---|
| No h1 | The page has no level-one heading. | Most pages name their topic with one h1. |
| More than one h1 | Two or more level-one headings. | A rule of thumb for most pages, not a requirement. |
| Skipped level | A heading jumps down more than one level, such as h2 to h4. | The W3C Web Accessibility Initiative advises against skipping heading ranks because it confuses people who navigate by headings. |
| Empty heading | A heading with no text. | It adds a stop for screen reader users and says nothing. |
| Long heading | A heading of more than 70 characters. | A readability threshold chosen for this tool, not a rule of any search engine. |
Google has said that for search the order and number of headings does not matter, while semantic order is very good for screen readers. The warnings are therefore about people reading and navigating the page, not about rankings.
Worked example
The sample page below mixes both heading styles, repeats a heading, skips a level and has a code block that looks like it holds a heading. The tool produced everything after it.
# Plan a blog calendar
Pick a rhythm
-------------
## Topics
#### Batch the writing
~~~
# This line is code, not a heading
~~~
## Topics
### Questions to answer| # | Level | Heading | Anchor |
|---|---|---|---|
| 1 | h1 | Plan a blog calendar | #plan-a-blog-calendar |
| 2 | h2 | Pick a rhythm | #pick-a-rhythm |
| 3 | h2 | Topics | #topics |
| 4 | h4 | Batch the writing | #batch-the-writing |
| 5 | h2 | Topics | #topics-1 |
| 6 | h3 | Questions to answer | #questions-to-answer |
Warnings: Heading 4 jumps from h2 to h4, skipping h3.
- [Pick a rhythm](#pick-a-rhythm)
- [Topics](#topics)
- [Batch the writing](#batch-the-writing)
- [Topics](#topics-1)
- [Questions to answer](#questions-to-answer)<ul>
<li><a href="#pick-a-rhythm">Pick a rhythm</a></li>
<li><a href="#topics">Topics</a>
<ul>
<li><a href="#batch-the-writing">Batch the writing</a></li>
</ul>
</li>
<li><a href="#topics-1">Topics</a>
<ul>
<li><a href="#questions-to-answer">Questions to answer</a></li>
</ul>
</li>
</ul>Using the table of contents
The anchors in the table of contents only work when the headings on your page carry the same ids. Many Markdown renderers and CMS themes add heading ids on their own; check that yours spells them the same way, or add the ids by hand. Choose the shallowest and deepest levels to list with the two selectors above the output.
Related tools and pages
- Slug generator: the same slug rule for page addresses.
- Keyword density checker: see whether a phrase appears in your headings.
- Article schema generator: describe the finished post to search engines.
- Quickstart: get started with BlogAutoPost.
Frequently asked questions
Why are the headings inside my code block ignored?
Text inside a fenced code block is code, not part of the page structure, so a line that starts with hash marks there is not a heading. The tool follows the CommonMark rule for fences made of backticks or tildes, including a longer closing fence.
Does a second h1 hurt my search results?
Google has said that the order and number of headings does not matter for search. The warning is a rule of thumb for readability and accessibility: most pages name their topic with a single h1.
Can I paste a whole HTML page?
Yes. Choose HTML as the input format and paste the page or a fragment. The browser parses it, ignores scripts and comments and lists the h1 to h6 elements it finds.
Why do two headings have anchors ending in -1 and -2?
Anchors must be unique on a page. The first heading with a given name keeps the plain anchor, the next gets -1, the one after -2, and so on.
Is my text uploaded?
No. The text is parsed in your browser and never sent to a server.
Sources
- CommonMark Spec 0.31.2: ATX headings, setext headings and fenced code blocks (read 2026-10-19)
- MDN: DOMParser (read 2026-10-19)
- W3C WAI: Headings (Web Accessibility Tutorials) (read 2026-10-19)
- Google Search Central: SEO Starter Guide, number and order of headings (read 2026-10-19)
Put BlogAutoPost on your blog
Start a 7-day trial, connect your WordPress, Shopify or Webflow blog and approve the first draft yourself.
- $1 for a 7-day trial. When the 7 days end, your card is charged from $95 a month for one site, and the plan renews every month until you cancel.
- Cancel any time with our ready-made cancel email. No reason needed.
- Your first paid month can be refunded within 7 days of paying it. Write to hello@blogautopost.com.