String Utilities Tool updated 2 months ago

Markdown Add Heading Numbers

Automatically add hierarchical numbering to Markdown headings. Supports multi-level numbering like 1, 1.1, 1.1.1 and skips fenced code blocks.

Always Free Easy to use Instant results Private and secure

Use Markdown Add Heading Numbers

Markdown Add Heading Numbers

Add clean hierarchical numbering to Markdown ATX headings while skipping fenced code blocks.

Input Markdown

Paste Markdown with headings
Supports # to ######. Existing heading numbers are replaced. Fenced code blocks are skipped.
Not numbered yet
Numbering status
0 numbered
Headings numbered

Output Markdown

Markdown with numbered headings
Numbering tip
Numbering resets automatically by heading level. Example: # 1, ## 1.1, ### 1.1.1.

Read Content

Learn how the tool works and when to use it.

The Markdown Add Heading Numbers tool automatically inserts hierarchical numbering into all ATX headings (# to ######) in your Markdown document, while leaving fenced code blocks untouched. Existing heading numbers are replaced with fresh counters.

Why Use This Tool?

Numbered headings improve document structure and readability, especially in technical documentation, tutorials, and long-form content where cross-referencing sections is common. Hand-numbering nested headings is tedious and breaks whenever you reorder sections.

How It Works

  • Paste your Markdown content into the input editor, or use the Paste button to pull from clipboard.
  • Click Add Numbers to scan all ATX headings and insert hierarchical numbers.
  • The tool counts detected headings, skips fenced code blocks, and replaces any existing numbers.
  • Copy the numbered output from the output panel, or download it as a .md file.

Key Features

  • Hierarchical numbering (1, 1.1, 1.1.1) for H1 through H6
  • Skips fenced code blocks (``` and ~~~) so sample code stays untouched
  • Replaces any existing heading numbers with fresh counters
  • Live counters for detected headings and numbered headings
  • Copy input, copy output, paste, clear, and download as .md

Comments (0)

For user discussion, edge cases, and follow-up tips.
Leave a comment
Your comment will appear publicly after submission.
No comments yet. Be the first to comment!
Let Us Know!
Report an issue with this tool

Describe the issue you encountered so we can investigate and improve the tool.

What helps most
Include the input, expected result, actual result, browser/device, and a screenshot when helpful.
The screenshot button captures the page in the browser and attaches the generated image to this form.
Full-page screenshot
Captured in your browser with newisty.
No screenshot captured yet.
Tool Report