SEO Tools
Heading anchor & id generator.
Paste a list of headings, one per line, and get one unique anchor per heading, with -1, -2 suffixes when two headings would collide. Choose GitHub-style slugs or plain HTML ids, then copy the heading tags, anchor links or Markdown links. Runs in your browser; nothing is sent or stored.
How it works: GitHub mode lowercases the heading, deletes punctuation and symbols, and turns each space into a hyphen; What’s new? (2026) becomes whats-new-2026. The second Intro becomes intro-1, the third intro-2. Plain HTML mode only enforces the HTML rule that an id is non-empty and has no ASCII whitespace.
Inputs
Result
Paste headings and press Generate anchors.
Method and limits
GitHub mode. Reproduces github-slugger 2.0.0 (ISC licence): lowercase the text, delete every character in the library’s generated list (other numbers, all punctuation except _, all symbols, controls, format characters, separators other than the space, and unassigned code points, based on Unicode 13), then replace each space with -. Repeats get a counter: the first duplicate is -1, the next -2, and each generated slug is also recorded, so a heading literally named Intro-1 after two Intro headings becomes intro-1-1. A heading made only of removed characters gives an empty slug, exactly as the library does. Source: github.com/Flet/github-slugger.
Plain HTML mode. The HTML Standard says an id must be unique in its tree, must contain at least one character, and must not contain ASCII whitespace (tab, line feed, form feed, carriage return, space). This mode trims the heading, turns each run of ASCII whitespace into one hyphen, keeps every other character (case is preserved unless you tick lowercase), and adds the same -1, -2 suffixes. An empty heading becomes section. Ids are case-sensitive, so Intro and intro do not collide unless lowercase is on. Sources: HTML Standard, the id attribute; Infra Standard, ASCII whitespace. An id that starts with a digit is valid HTML, but needs escaping in a CSS selector.
NFKD. Normalization Form KD splits accented letters into a base letter plus combining marks and replaces compatibility characters (for example the fi ligature becomes fi). GitHub itself does not do this, so turn it on only when you want slugs that differ from GitHub’s.
Limits. GitHub builds the slug from the rendered heading text, so paste plain text: **Bold** <code>x</code> is not unwrapped here. Other renderers (GitLab, Docusaurus, MkDocs) use their own slug rules, so check the target renderer before linking. A leading # marker on a line sets the heading level for the markup; lines without one are treated as level 2.
Not the same as the URL slug generator. The URL slug generator makes one SEO-friendly path slug from one title. This tool works on a whole list of headings on one page and keeps every anchor unique within it.
Worked example
Press Load example in GitHub mode. The six lines are # Guide, ## Introduction, ## What's new? (2026), ## Introduction, ## Introduction and ### Café setup. The anchors come out as:
Guidegives#guide- the first
Introductiongives#introduction, the second#introduction-1and the third#introduction-2 What's new? (2026)gives#whats-new-2026: the apostrophe, question mark and brackets are deleted and the spaces become hyphensCafé setupgives#café-setup: GitHub's slugger keeps the é, so tick NFKD and remove accents only if you wantcafe-setup
Heading anchor generator FAQ
Why does the second heading get a -1 suffix?
Two ids on one page must differ, so the first heading keeps the plain slug and each repeat gets a counter: introduction, introduction-1, introduction-2. This matches how github-slugger numbers repeats.
Will these anchors match the ones GitHub creates?
In GitHub mode the tool reproduces github-slugger 2.0.0 on plain heading text. Other renderers such as GitLab, Docusaurus or MkDocs use their own rules, so check the target renderer before you link to a generated anchor.
What is allowed in an HTML id?
The HTML Standard requires an id to be unique in its tree, to contain at least one character, and to contain no ASCII whitespace. Plain HTML mode enforces only those rules.
Does this change my SEO?
No ranking effect is claimed. Anchors let readers and links point to a section, and Google can sometimes show a jump-to-section link for a page, but Google says it does not control that and it is not guaranteed.
Is my heading list sent anywhere?
No. Everything is generated in your browser and nothing is stored.