String Utilities Tool updated 1 day ago

Markdown Remove Heading Numbers

Markdown Remove Heading Numbers strips typed section numbers such as 1, 1.2 or 1.2.3. from the start of Markdown headings, keeping the heading level and text. Numbered lists and fenced code blocks are left alone, and counters show how many headings were detected and cleaned. It runs entirely in your browser and the result downloads as a .md file.

Always Free Easy to use Instant results Private and secure

Use Markdown Remove Heading Numbers

Markdown Remove Heading Numbers

Remove hierarchical numbering from Markdown ATX headings while skipping fenced code blocks.

Input Markdown

Paste Markdown with numbered headings
Removes heading prefixes like 1, 1.2, 1.2.3, and 1.2.3.. Fenced code blocks are skipped.
Not processed yet
Cleanup status
0 cleaned
Headings cleaned

Output Markdown

Markdown after heading numbers are removed
Cleanup tip
This only removes numbers from heading text. Non-heading numbered lists remain unchanged.

Read Content

Learn how the tool works and when to use it.

Clean section numbers off your headings

Markdown Remove Heading Numbers strips manual numbering such as 1, 2.3 or 4.1.2. from the start of Markdown headings. A heading written as ## 2.1 Installing the agent becomes ## Installing the agent. The heading level, the rest of the heading text and every other line in the document stay as they were.

Hand-typed section numbers are common in documents that started life in a word processor, in specifications and policies, in exported wikis and in AI-generated outlines. They become a maintenance problem the moment you insert, delete or reorder a section, because every number after it has to be renumbered by hand. Many publishing setups also add numbering automatically through CSS counters or a table-of-contents plugin, which leads to double numbers like "2. 2.1 Installing". Removing the typed numbers fixes both problems.

What the tool recognises as a heading number

The rule is precise, so it helps to know it before you run the tool. A line is treated as a heading when it starts with one to six # characters followed by whitespace and some text. The number is removed when that text begins with:

  • one or more digits,
  • optionally followed by more groups of a dot and digits (1.2, 1.2.3, 10.4.1.7),
  • optionally followed by a final dot,
  • and then at least one space or tab.
Heading in inputHeading in output
# 1 Introduction# Introduction
## 1.2 Scope## Scope
### 1.2.3. Exclusions### Exclusions
## 3) Pricingunchanged: a parenthesis is not part of the pattern
## 3 - Pricing## - Pricing: only the number and space go
## A.1 Appendixunchanged: letters and Roman numerals are not matched
## 1.Overviewunchanged: no space after the number

Ordinary numbered lists such as 1. First step are never touched, because they do not start with #. The tip on the tool page makes the same point: only heading text is changed.

The one trap: headings that start with a real number

The tool cannot tell a section number from a number that belongs to the title. A heading like ## 2026 roadmap, ## 404 errors or ## 3 ways to deploy matches the pattern and loses its first word. Search your output for headings that now read oddly, or rephrase those headings before running the tool (for example "Roadmap for 2026").

Other details worth knowing

  • Code fences are skipped. Lines inside ``` or ~~~ blocks are copied as they are, so a shell comment like # 1 install deps in a code sample is not mistaken for a heading.
  • Every heading is rewritten in a normal form. The tool rebuilds each matched heading as the hashes, a single space and the trimmed text. Extra spaces after the hashes and trailing spaces are removed, even on headings that had no number.
  • The heading must start at the beginning of the line. Headings indented with spaces are not matched.
  • Setext headings are ignored. Headings underlined with === or --- are not recognised.
  • Closing hashes stay. In ## 2 Setup ## the number goes and the closing hashes remain as part of the text.

Private by design

Processing is done by JavaScript in your browser. Your document is not uploaded anywhere, which matters for internal specs, contracts and drafts that should not leave your device.

How to remove heading numbers

  1. Paste your Markdown into Input Markdown, or click Paste at the top of the tool.
  2. Glance at the footer: after pasting it shows how many numbered headings detected it found.
  3. Click Remove Numbers.
  4. Check the status cards. Cleanup status reads "Output ready", and Headings cleaned shows how many headings actually lost a number.
  5. Review the Output Markdown editor, particularly any heading that began with a year or count.
  6. Click Copy Output, or Download to save markdown-without-heading-numbers.md. Copy Input and Clear are available on the input card.

Example: a policy document

Before:

# 1 Information Security Policy
## 1.1 Purpose
## 1.2 Scope
### 1.2.1 Contractors
1. All staff must complete training.

After:

# Information Security Policy
## Purpose
## Scope
### Contractors
1. All staff must complete training.

Four headings cleaned; the numbered list item underneath is unchanged.

After cleaning

If your readers still need numbered sections, let the platform add them. Many static site generators and documentation themes can number headings automatically, and a stylesheet can do it with CSS counters. That way, numbers update themselves when sections move. If you need a table of contents, generate it from the cleaned headings so the anchors do not include the old numbers.

Why clean headings help links and search

Most Markdown renderers create an anchor for each heading from its text, so ## 2.1 Installing the agent usually gets an anchor built from "2.1 Installing the agent", with the number and dot folded into the slug. Once the section moves and becomes 3.4, either the heading lies or the anchor changes and every link to it breaks. Headings without numbers produce anchors based only on their words, which stay stable as the document grows. Clean headings also read better in search results, browser tabs and tables of contents, where a string of digits in front of every title adds clutter without adding meaning. If a document has external links pointing at old numbered anchors, keep a note of them before cleaning so you can update or redirect them.

What not to do

  • Do not run it on documents where section numbers are referenced elsewhere, such as "see section 4.2", without updating those references too.
  • Do not skip the review step. Read down the list of headings in the output; if one now starts with a dash, a stray word or reads oddly, open that section and fix it by hand.
  • Do not expect it to renumber. It only removes numbers; it never adds or recalculates them.
  • Do not use it for numbered list items. They are deliberately left alone.

Limitations

  • Only Arabic digits separated by dots are recognised. Formats such as 1), 1-, 1:, §1, A. or IV. are not removed.
  • Numbers that are part of the title are removed too.
  • Indented and setext headings are not processed.
  • An unclosed code fence causes all following headings to be skipped.

Related clean-ups: Markdown Remove HTML for leftover tags from exported documents, and Markdown Previewer to check the final layout.

Frequently Asked Questions

FAQ

Short answers for the questions users ask before trusting the result.

Digits with optional dot-separated levels and an optional trailing dot, followed by a space, such as 1, 1.2, 1.2.3 and 1.2.3., at the start of a heading.

No. Only lines that start with one to six # characters are treated as headings. Numbered list items are left exactly as they are.

A number at the start of a heading followed by a space matches the pattern, so the tool cannot tell it apart from a section number. Rephrase such headings before running the tool or fix them afterwards.

No. Lines inside fenced code blocks marked with ``` or ~~~ are skipped, so comments in code samples are not changed.

No. Parentheses, dashes, letters and Roman numerals are not part of the pattern, so those headings stay unchanged.

No. The tool runs in JavaScript in your browser and does not send your text to a server.

The cleaned Markdown, saved as markdown-without-heading-numbers.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