URL Slug Generator

Turn a headline into a URL slug: accents stripped, punctuation removed, optional stop-word removal, your choice of separator and a length limit.

The interactive tool loads here when JavaScript runs.

About this tool

What is the URL Slug Generator?

The URL Slug Generator turns a title or phrase into a clean URL segment such as how-to-write-better-urls. It strips accents, removes punctuation, joins words with your chosen separator and trims to a maximum length (50 characters by default), cutting back to the last separator so words are not chopped in half.

Options let you keep or drop lower-casing, remove common English stop words like "the" and "and", and choose a hyphen, underscore or dot as the separator. Existing hyphens and underscores in the title are treated as word breaks, so the output uses one separator consistently. Slugs you copy are kept in a short history list for the session.

Only letters a to z, digits and the separator survive. Characters from non-Latin scripts and letters that do not decompose into a base letter plus accent (ß, æ, ø, ł) are removed, so write those slugs by hand.

  • Accent stripping and punctuation removal
  • Hyphen, underscore or dot separators, applied consistently
  • Optional lower-casing and stop-word removal
  • Maximum length that trims back to a whole word
  • History of copied slugs; runs in your browser
Read the guide: URL Slugs: How to Write Clean, Stable, Search-Friendly URLs

Updated

How to use the URL Slug Generator

  1. Type or paste your title into the text box, or click one of the example titles.
  2. Choose options: Convert to lowercase, Remove stop words, the separator, and Max Length (0 means unlimited).
  3. Check the slug and the example URL preview.
  4. Copy the slug. Copied slugs appear in the history list so you can reuse them.

Worked examples

A headline with accents and punctuation

Input

The Café Crème Guide: 10 Easy Recipes!

Output

the-cafe-creme-guide-10-easy-recipes

é and è lose their accents, the colon and exclamation mark disappear, and spaces become hyphens. 36 characters, so the default 50-character limit does not cut it.

Stop words removed and a 25-character limit

Input

The Café Crème Guide: 10 Easy Recipes! (Remove stop words on, Max Length 25)

Output

cafe-creme-guide-10-easy

"the" is dropped, giving 32 characters. Cutting at 25 would end mid-word, so the slug is trimmed back to the last hyphen.

Background and insight

The word "slug" comes from newspaper publishing, where it meant the short working name given to a story as it moved through the newsroom. Content management systems borrowed it in the 2000s for the human-readable part of a URL, and WordPress made it a household term for web publishers.

Google's URL structure guidance recommends simple, descriptive URLs and using hyphens rather than underscores to separate words. A readable slug also helps people: it tells them what they will get before they click and looks trustworthy when shared.

The most important property of a slug is stability. Once a page is published and linked, changing its slug breaks those links unless you add a permanent (301) redirect. Choosing a concise slug carefully at the start, and leaving dates or temporary words out of it, saves migrations later.

Common use cases

  • Blog posts and articles

    Create a short, readable slug from a long headline.

  • Product and category pages

    Generate consistent slugs for catalogue pages.

  • Filenames

    Make safe, space-free filenames for assets and documents.

  • Anchor IDs

    Turn section headings into IDs for in-page links.

Tips and limitations

  • Stop-word removal can change meaning: "to-be-or-not-to-be" disappears almost entirely. Read the result before using it.
  • Leave years and "new" out of evergreen URLs so you never need to rename them.
  • German ß, Danish ø and Polish ł are removed rather than transliterated. Replace them with ss, o and l before generating.
  • The dot separator produces slugs like my.page, which some servers treat as a file extension. Prefer hyphens for URLs.
  • Changing a published slug needs a 301 redirect from the old URL, or existing links and search results break.

Sources and further reading

  1. URL structure best practices for Google Search, Google Search Central. Simple, descriptive URLs with hyphens between words
  2. Redirects and Google Search, Google Search Central. Using permanent redirects when a URL changes
  3. RFC 3986: Uniform Resource Identifier (URI): Generic Syntax, IETF. Which characters are allowed in a URL path
  4. Customize permalinks, WordPress. How WordPress builds post slugs

Frequently asked questions

Should URL slugs use hyphens or underscores?

Hyphens. Google's documentation recommends hyphens to separate words in URLs, and they stay readable when a link is underlined, where an underscore can disappear into the line. Underscores are fine for filenames and identifiers, but hyphens are the web convention for slugs.

Should I remove stop words from a slug?

Sometimes. Dropping "the", "a" and "of" shortens long slugs, but keep them when removing them changes the meaning or makes the slug awkward. "how-to-fix-a-flat-tire" reads better than "fix-flat-tire" for some audiences. Stop-word removal is off by default for that reason.

How long should a URL slug be?

There is no fixed limit, but short and descriptive works best: three to six meaningful words, usually under 60 characters. The default Max Length here is 50 characters. Long slugs get truncated in search results and are harder to share or read aloud.

What happens to non-Latin characters in the slug?

Accents are removed from Latin letters, so é becomes e. Characters from other scripts, such as Cyrillic, Greek, Arabic or Chinese, are removed entirely, and so are letters like ß and ø. For those titles, transliterate first or write the slug by hand.

Can I change a slug after publishing a page?

You can, but add a permanent 301 redirect from the old URL to the new one so existing links, bookmarks and search rankings carry over. Without it, visitors get a 404 and search engines treat the new URL as a new page.

Is there an in-depth guide to the URL Slug Generator?

Yes. “URL Slugs: How to Write Clean, Stable, Search-Friendly URLs” covers the background, how it works, common pitfalls and worked examples. Read the full guide.