URL Slug Generator

Turn a headline or phrase into a clean URL slug with accents removed and punctuation stripped, using a hyphen or underscore, with optional stop word removal and a length limit. It is free and runs in your browser.

URL Slug GeneratorPrivate · runs on your device
Input
Words 0Characters 0Lines 0
Slug

Example: How to Make Café Crème at Home! → how-to-make-cafe-creme-at-home

How to use the URL slug generator

The slug appears in the Slug box as you type.

  1. Type or paste a title into the Input box.
  2. Pick a Separator: Hyphen (-) or Underscore (_).
  3. Tick Keep letter case if you need capitals preserved. Without it, everything is lowercased.
  4. Tick Remove stop words to drop short filler words, and set Max length (0 = none) to limit the number of characters.
  5. Copy the slug into your CMS, file name or route.

The tool treats everything in the box as one title, so paste one title at a time.

The exact rules, with a worked example

The tool first separates accents from their letters and discards them, so é becomes e, then maps ß to ss, æ to ae, ø to o, đ to d and ł to l. Apostrophes are deleted, so don't becomes dont. Every other run of characters that is not a letter or digit, such as spaces, punctuation and symbols, becomes a single separator, and separators at either end are trimmed.

For How to Make Café Crème at Home! the results are:

  • Default: how-to-make-cafe-creme-at-home
  • With Remove stop words: how-make-cafe-creme-home
  • With Underscore and Keep letter case: How_to_Make_Cafe_Creme_at_Home
  • With Max length 20: how-to-make-cafe

The stop word list is fixed: a, an, the, and, or, but, of, on, in, at, to, for, with, by, from, is, are, was, were, be, this, that, it and as. When a length limit applies, the slug is cut and then trimmed back to the last separator, so a word that ends exactly on the limit may be dropped. Allow a character or two extra if that matters.

Two more titles show the mapping. Crème Brûlée & Cheese becomes creme-brulee-cheese, since the ampersand is dropped as punctuation. Ærø Ørsted: 10 tips becomes aero-orsted-10-tips, with the digits kept. Capital letters survive only when Keep letter case is ticked.

Limits and good practice

Only the letters A to Z and the digits 0 to 9 survive. Cyrillic, Greek, Arabic, Chinese and other non-Latin scripts are not transliterated, so a title written only in those scripts produces an empty slug, and in a mixed title only the Latin words remain. An ampersand is treated as punctuation, so Q&A becomes q-a.

Short slugs of three to six meaningful words are easier to read and share. Google's guidance recommends hyphens to separate words, which is why they are the default. Once a page is live, avoid changing its slug without setting up a redirect, since the old address will otherwise return an error. Leave dates and numbers out of a slug unless they are part of the page's identity.

Slugs pair naturally with other publishing tasks. The meta tag generator builds the title, description and canonical link for the page, the UTM builder tags a link when you share it, and the URL encoder deals with query strings and characters a slug removes. For plain lowercasing only, use the lower case converter. Unpublished titles stay in your browser.

A few habits help in practice. Put the main topic words first and leave out dates that will age. Be careful with Remove stop words, because it can change meaning: Where Is the Library becomes where-library, and To Be or Not to Be becomes just not. It suits long blog titles better than short or quoted ones. Keep slugs unique within a folder, since two pages sharing one will clash. Pick one style, lowercase with hyphens, and use it everywhere, because mixed styles are harder to type and share. Check the result by eye before publishing, especially for names that contain non-Latin letters.

When you migrate a site, generate new slugs one title at a time and keep a spreadsheet that maps each old address to its new one, since redirects need both. The tool only creates the text. It does not check whether a slug is already in use, so search your own site for duplicates before you publish.

Quick answers

Frequently asked questions

The questions people ask most, answered in plain words.

What is a URL slug?

A slug is the readable last part of a web address that identifies one page, such as how-to-make-cafe-creme-at-home in a blog link. It is normally made of lowercase letters, digits and hyphens, so it works in every browser without percent-encoding.

Should I use hyphens or underscores in URLs?

Use hyphens. Google recommends them to separate words, so cafe-creme is read as two words. Underscores are available in this tool for systems that expect them, but for public web pages hyphens are the safer default and are easier to read in links.

How does the Max length option cut a slug?

It cuts the slug at the limit and then trims back to the last separator, so you never end on half a word. A word that ends exactly on the limit may be dropped as well, so set the limit a character or two higher than you need.

What happens to accented and non-Latin characters?

Accented Latin letters lose their accents, so é becomes e, and ß, æ, ø, đ and ł have fixed replacements. Letters from other scripts such as Cyrillic or Greek are not transliterated and are dropped, so use a Latin version of the title for those pages.

Can I convert several titles at once?

No. Everything in the Input box is treated as a single title, and line breaks become separators, so a list of titles would merge into one long slug. Convert titles one at a time, or paste each into the box in turn and copy the result.