Zahid Awais Get a free audit

Free anchor ID generator for headings

Paste your headings, one per line, and get clean, unique id values with the #jump link and the HTML for each one.

By Zahid Awais · Content tools · Free, private, no sign-up

Every id is unique in the list: repeats get -2, -3. Nothing you type leaves your browser.

Result
0Headings
0Repeats renamed
0Shortened
      Anchor ID Generator: what it does and an example result

      The free anchor ID generator turns heading text into clean id values you can put on your headings, then shows the #jump link and the HTML for each one. Every id in the list is unique, and the tool runs in your browser.

      Quick answer

      An anchor ID is the id attribute on a heading, such as id="pricing", that lets a link ending in #pricing jump straight to that section. Good ids are unique on the page, contain no spaces, stay short and match the heading words. This tool makes them from your headings and handles repeats and accents.

      What is an anchor ID?

      An anchor ID is the value of the id attribute on an element, usually a heading, that a link can target with a fragment. <h2 id="pricing">Prices</h2> is the anchor, and #pricing or https://www.example.com/guide/#pricing is the jump link that scrolls to it. Tables of contents, "back to top" links and links from other pages to one section all depend on these ids.

      The HTML rules for an id are short: it must be unique in the page, it must have at least one character and it must not contain spaces or other whitespace. Everything else is a matter of style. Short, lowercase, hyphenated words that match the heading are easy to read, share and keep stable. To build the whole list of links at once from your page HTML, use the table of contents generator.

      How do you use the Anchor ID Generator?

      How to use the Anchor ID Generator: enter details, see the result and copy it
      Real screenshot of the Anchor ID Generator with the example input from this page.
      1. Type or paste your headings, one per line. HTML tags in a line are removed.
      2. Add the page URL if you want full links to share, or leave it empty for #fragments only.
      3. Choose the separator, the maximum length and the heading tag for the HTML output.
      4. Keep lowercase and accent removal on for the cleanest ids. Tick the filler word option for shorter ids.
      5. Copy the HTML headings or the jump links, and check the warnings for ids that start with a digit.

      What makes an id valid in HTML?

      An id is valid when it is unique in the document, has at least one character and contains no whitespace. HTML does not require it to start with a letter, so 10-tips works as a link target. The catch is CSS: a selector such as #10-tips is not valid CSS, so scripts and styles need [id="10-tips"] or an escaped selector. That is why the tool counts ids that start with a digit, and why many writers simply start with a word.

      Should anchor ids use hyphens or underscores?

      Either works for linking. Hyphens are the common choice because they match the style of most URL slugs and read clearly in a shared link. Google's URL structure guidance recommends hyphens over underscores in URLs, but it also says "Google Search generally doesn't support URL fragments", so the choice inside a #fragment is about readability and consistency, not rankings. Pick one and use it on every page.

      Do anchor ids affect SEO?

      Not directly. A URL with #pricing is the same page as the URL without it for Google Search, so an id cannot rank or be indexed on its own. Ids help in indirect ways: a table of contents built on them lets readers reach the right section, and you can link to a section from other pages with descriptive anchor text, which Google's link best practices describe as "descriptive, reasonably concise, and relevant".

      Quick reference

      HeadingAnchor idRule applied
      Prices & packagesprices-packagesSymbols removed, words joined
      Prices & packages (again)prices-packages-2Repeat gets -2
      Café and restaurant sitescafe-and-restaurant-sitesAccent removed
      10 tips for outreach emails10-tips-for-outreach-emailsValid, but escape it in CSS
      The Best SEO Tools of 2026best-seo-tools-2026Filler words dropped (option)
      !!!sectionNo letters or digits left

      Worked example

      Example

      Example: the default list has 6 headings from a guest posting guide. The tool returns 6 unique ids. "Prices & packages" appears twice, so the second becomes prices-packages-2. "Café and restaurant sites" becomes cafe-and-restaurant-sites, and its full link is https://www.example.com/guest-posting-guide/#cafe-and-restaurant-sites. The long pitch question is shortened at a word break to how-do-you-write-a-pitch-that-gets-replies-from-busy-editors, 60 characters, and 10-tips-for-outreach-emails is counted as starting with a digit.

      Learn more

      Frequently asked questions

      What is the difference between an anchor id and a slug?

      A slug is the part of the URL path that names the page, such as /guest-posting-guide/. An anchor id names one section inside the page and appears after the #. Both are best short, lowercase and hyphenated.

      Can two headings have the same id?

      No. An id must be unique on the page. If two headings share one, a link to it jumps to the first match only. The tool adds -2, -3 to repeats so every id stays unique.

      Are ids case sensitive?

      Yes. #Pricing and #pricing are different targets, so the link must match the id exactly. Lowercase ids avoid mistakes when people type or edit links by hand, which is why the option is on by default.

      Can I use non-English characters in an id?

      Yes. Letters from any script are allowed, and the tool keeps them. With accent removal on, Latin letters such as é become e. Shared links may show encoded characters, so plain Latin ids are easier to copy.

      Should I change ids on published pages?

      Only when they are invalid or duplicated. Other pages, emails and social posts may already link to the old #fragment, and changing it sends those visitors to the top of the page instead of the section.

      Is my text sent anywhere?

      No. The generator runs entirely in your browser with JavaScript. Nothing you type is uploaded or stored, so you can use it on drafts and unpublished client pages.

      Sources

      Checked 23 Oct 2026. Facts checked against these official pages. Read how I check facts in my editorial policy.

      Related free tools

      All free tools

      SEO Slug Generator

      A slug generator is a tool that converts a page title into the last readable part of a URL. It lowercases the…

      Heading Structure Checker

      A heading structure checker is a tool that extracts every H1 to H6 element from a page in document order and…

      Want a full audit instead?

      Send your website and I will check it for you, free.

      Get my free audit
      Chat on WhatsApp
      Free updates

      Get new tools, guides and coupons first

      One short email when something new goes live: articles, free SEO tools, package updates, discounts and price alerts. No spam, unsubscribe in one click.