Developer Tools
Markdown Anchor Link Generator
Generate the exact heading anchor IDs each Markdown flavor produces (GitHub, GitLab, Bitbucket, Hugo, Pandoc) and copy ready-to-paste links for any heading.
Mode
Anchors by flavor
Each platform applies different rules. Copy the one that matches where you are publishing.
GitHub
README files, GitHub Issues, Discussions, Wiki, Gist
GitLab
GitLab repos, Issues, MRs, Wiki
Bitbucket
Bitbucket Cloud and Server READMEs and Wiki
Hugo
Hugo static site generator default ID rule
Pandoc
Pandoc default auto-identifier algorithm
Markdown link
Paste into a README or Markdown doc.
Markdown link will appear here.HTML link
Useful for static-site templates and MDX components.
HTML link will appear here.Flavor reference
GitHub / GFM
- Lowercase
- Strip punctuation (keep letters, numbers, spaces, _, -)
- Spaces become hyphens
- Unicode letters and numbers are kept (CJK, accents)
- Duplicates suffixed -1, -2, -3, ...
GitLab
- Lowercase (NFKD-normalized)
- Only ASCII letters, digits, underscore, hyphen are kept
- Whitespace becomes hyphens
- Collapse repeated hyphens; trim ends
- Duplicates suffixed -1, -2, -3, ...
Bitbucket
- Always prefixed with markdown-header-
- Non-alphanumeric becomes hyphens
- Collapse repeated hyphens; trim ends
- Duplicates suffixed _1, _2, _3, ...
Hugo (ASCII)
- Lowercase (NFKD-normalized, diacritics stripped)
- Only [a-z0-9_-] kept
- Spaces become hyphens
- Collapse repeated hyphens; trim ends
- Duplicates suffixed -1, -2, -3, ...
Pandoc auto-id
- Lowercase
- Drop everything before the first letter
- Keep letters, digits, _, -, .
- Spaces become hyphens
- Empty result falls back to 'section'
- Duplicates suffixed -1, -2, -3, ...
How to use
- Pick Single heading to compare flavors for one heading, or Whole document to process an entire Markdown file at once.
- Choose the active flavor (GitHub, GitLab, Bitbucket, Hugo, or Pandoc) to control which output is used for the ready-to-paste link markup and the bulk outputs.
- Type or paste a heading, or the full document, into the input. Counts and anchors update as you type.
- In single mode, copy the anchor for the platform you publish to, or copy the Markdown link or HTML link directly.
- In bulk mode, copy the anchor list, the table of contents (set the start level to skip H1), the one-link-per-line block, or the HTML headings block.
- Open Flavor reference at the bottom to see the rule set each platform uses so you can verify exactly what the generator did.
About this tool
Markdown Anchor Link Generator produces the heading anchor IDs that different Markdown renderers actually use for the same heading text, then hands you copy-ready link markup. Different platforms apply different rules, so the same heading 'Installation & Setup Guide' becomes installation--setup-guide on GitHub, installation-setup-guide on GitLab, markdown-header-installation-setup-guide on Bitbucket, installation-setup-guide on Hugo, and installation-setup-guide on Pandoc. This tool implements each algorithm so you do not have to guess which one your platform uses or push commits to find out a link is broken. The single-heading mode displays every flavor side by side, with copy buttons for the anchor (#installation-setup-guide) and ready-to-paste Markdown ([Installation](#installation-setup-guide)) and HTML (<a href="#installation-setup-guide">Installation</a>) link markup. The whole-document mode parses any Markdown file (ATX headings # through ######, setext underlines, fenced code blocks safely skipped, inline code, bold, italic, strikethrough, and link markup stripped from heading text) and emits the anchor list, a nested table of contents with start-level control, a one-link-per-line block, and an HTML headings block with id attributes. Duplicate heading disambiguation matches each platform's real suffix style (-1, -2, -3 for GitHub, GitLab, Hugo, and Pandoc; _1, _2, _3 for Bitbucket) and tracks counts the way github-slugger does so the second 'Examples' becomes examples-1, the third becomes examples-2, and so on. Unicode-aware: GitHub keeps CJK characters and accents in anchors; GitLab, Hugo, and Pandoc strip diacritics after NFKD normalization to keep the anchor ASCII. Useful for README files, GitHub Issues and Pull Requests, Wiki pages, Bitbucket and GitLab repos, MkDocs and Docusaurus docs, Hugo, Jekyll, Astro, and Eleventy sites, Pandoc-generated PDFs and EPUBs, and any documentation workflow where linking to a specific heading inside a long page matters. Everything runs locally in your browser. The headings and documents you paste here are never uploaded.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
Slug Generator
Turn titles into clean URL slugs.
Open tool
TextMarkdown TOC Generator
Build a GitHub-style Markdown table of contents from any document.
Open tool
DeveloperMarkdown Cheat Sheet
Searchable Markdown syntax reference with rendered previews and flavor filters.
Open tool
TextMarkdown Editor
Live markdown editor with toolbar, preview, table of contents, and .md or .html download.
Open tool
TextMarkdown Link Extractor
Pull every inline, reference, autolink, and image link out of Markdown.
Open tool
DeveloperMarkdown Table Formatter
Realigns GFM pipe tables in source view with per-column alignment.
Open tool
SEOHTML Headings Extractor
Extract h1-h6 from any HTML, view the outline, and check for skipped or empty headings.
Open tool