URL Slug Generator

Turn any title into a clean, SEO-friendly URL slug — lowercase, hyphenated and safe. Strips accents and optional stop words, right in your browser.

One title per line. Blank lines are ignored.

Accented letters are folded to plain ASCII (São → sao). Everything runs in your browser — your text is never uploaded or stored.

Your slug

All slugs

characters, .

Example:

Type a title above to generate a slug.

What a URL slug is

A slug is the human-readable part of a URL that identifies one specific page — the url-slug-generator in example.com/tools/url-slug-generator. The name comes from newspaper and publishing jargon, where a "slug" was the short working name an editor gave a story while it moved through production.

A good slug is lowercase, uses hyphens between words, contains only unreserved URL characters, and is short enough to read at a glance. That matters for more than tidiness: slugs are visible in search results, in link previews and in anything a person copies into a chat message. Characters outside the safe set get percent-encoded by the browser, so a space becomes %20 and an accented character can expand to several bytes — turning a readable address into noise.

How to use this generator

  1. Paste your title. One title per line — paste a whole list of headings and you get a slug for each, in order. Blank lines are skipped.
  2. Pick a separator. Hyphens are the right default. Underscores and dots work technically but are less conventional in web URLs.
  3. Set a max length if your CMS or routing layer has a limit. Leave it at 0 for no limit. When a slug is trimmed, the cut is made at a word boundary so you never end up with half a word.
  4. Toggle the options — force lowercase, strip stop words, spell out symbols — and watch the result update as you type.
  5. Copy it. With one title the button copies that slug; with several, it copies the whole list.

The method, step by step

The transformation is deterministic, and it runs in this order:

  1. Fold accents to ASCII. Letters are decomposed with Unicode NFD normalisation and the combining marks are dropped, so é becomes e and ü becomes u. A small lookup table handles letters NFD cannot split, such as ß → ss, ø → o and æ → ae.
  2. Spell out symbols (optional): & → and, @ → at, % → percent, + → plus. Without this they would simply disappear, and R&D would read as r-d.
  3. Delete apostrophes and quotes so lover's becomes lovers rather than lover-s.
  4. Lowercase (optional). Hostnames are case-insensitive but paths are not, so /About and /about are two different URLs as far as the standard is concerned. Lowercase everything and that ambiguity never arises.
  5. Split on anything that is not a letter or digit, discard the empty pieces, and rejoin with your separator. Collapsing runs of punctuation in a single pass is what stops -- and trailing hyphens from ever appearing.
  6. Remove stop words (optional) — common words like the, and, of and to. If a title consists of nothing but stop words, the tool keeps them instead of handing back an empty slug.
  7. Trim to the max length at the last separator before the limit.

A worked example

Start with the default title: The 10 Best Coffee Shops in São Paulo — A Café Lover's Guide!

  • Accent folding gives The 10 Best Coffee Shops in Sao Paulo — A Cafe Lover's Guide!
  • Apostrophes go, so Lover's becomes Lovers
  • Lowercasing and splitting on non-alphanumerics produces the words the, 10, best, coffee, shops, in, sao, paulo, a, cafe, lovers, guide — the em dash and the exclamation mark vanish rather than leaving gaps
  • Joined with hyphens: the-10-best-coffee-shops-in-sao-paulo-a-cafe-lovers-guide (57 characters)
  • Turn on strip stop words and the, in and a drop out: 10-best-coffee-shops-sao-paulo-cafe-lovers-guide (47 characters)
  • Add a max length of 30 and the result is cut back to the last whole word: 10-best-coffee-shops-sao

Should you strip stop words?

It is a genuine trade-off, and reasonable people disagree. Removing stop words makes a slug shorter and raises the share of it that is meaningful keywords. But Google's own guidance on URL structure asks for URLs that are simple and readable to humans, and over-trimming makes a slug read like a telegram. Google has also said publicly that words in the URL are a very small ranking factor, so this is mostly a readability decision rather than a ranking one. The rule most editorial teams land on: strip stop words when the title is long and the slug would otherwise sprawl, and leave them in when removing them hurts comprehension — how-to-tie-a-tie is clearer than how-tie-tie.

Slug rules worth knowing

  • Keep it stable. Changing a published slug breaks every existing link to the page. If you must change one, serve a 301 redirect from the old path to the new one.
  • Hyphens, not underscores. Google has long recommended hyphens as word separators in URLs, because they are treated as word boundaries.
  • No stuffing. Repeating a keyword in the slug does nothing useful and reads badly.
  • Watch for collisions. Two different titles can produce the same slug — "The Best Tools" and "Best Tools" both become best-tools once stop words are stripped. Most systems append -2 or an ID; check before publishing.
  • Non-Latin scripts. Accent folding only helps languages written in Latin script. For Greek, Cyrillic, Arabic or CJK text it produces nothing usable — you either transliterate properly for that language or use a percent-encoded internationalised URL, which modern browsers display back to the reader correctly.
  • Mind the whole URL length. There is no limit in the URI standard itself, but browsers, proxies and server software each impose their own practical ceilings, so short slugs are the safe habit.

Privacy

This page is static and the generator is plain JavaScript running in your tab. There is no server call, no analytics event and no storage: whatever you paste in stays on your device and is gone when you close the tab. You can confirm that by opening your browser's network tab while you type, or by reading the page source.

References

✏️ Edit this page on GitHub