Independent writing tools and guides, edited by a human

Slug Generator

Turn titles into SEO-friendly URL slugs with stopword removal, length limits, and hyphen or underscore separators.

Your workbench
0 characters
Read-only
Ready when you are.
On this page (08)
  1. 01The one part of a URL you actually choose
  2. 02What the transformation actually does
  3. 03The three conversions that surprise people
  4. 04Non-Latin scripts are preserved, not transliterated
  5. 05Hyphens, stopwords, and length
  6. 06Slugs are cheap to generate and expensive to change
  7. 07Frequently Asked Questions
  8. 08Check the slug against your own site before you publish

The one part of a URL you actually choose

Paste a headline into the box above and you get back a single lowercase string with hyphens where the spaces were. Café Notes: A Better Way to Write comes back as cafe-notes-a-better-way-to-write. That looks like a formatting chore nobody needs a tool for, right up to the moment a slug is live, indexed, pasted into a newsletter archive, and quoted in a forum thread you have no control over.

A slug is not a title, not a filename, and not a summary. It is the last segment of a URL, and its real requirements are modest: readable out of context, stable over time, unlikely to collide with another page on the same site. Most of what people assert about slugs beyond that is either a small ranking nudge or folklore, and the guide to slugs and search takes that argument apart properly. This page covers the mechanical half.

What the transformation actually does

The conversion runs in a fixed order, and knowing the order explains every strange result you will meet.

  1. The text is normalised to NFKD, a Unicode form that splits letters into a base letter plus a separate accent mark. "é" becomes "e" followed by a combining accent.
  2. Those combining marks are deleted. That is what removes an accent rather than substituting one.
  3. The whole string is lowercased.
  4. Every run of characters that is neither a letter nor a number becomes a single hyphen.
  5. Leading and trailing hyphens are trimmed.

Step four is greedy: one space, or a colon followed by three spaces and a dash, both collapse to a single hyphen. Here is what that produces on real input:

You pasteYou getWhat happened
naïve résumé déjà vunaive-resume-deja-vuAccents decomposed, then dropped
Hello World -- Againhello-world-againA long punctuation run collapsed to one hyphen
50% off sale50-off-saleDigits survive; symbols become separators
emoji 🎉 partyemoji-partyEmoji are neither letters nor numbers
Résumé / CVresume-cvThe slash became a hyphen, not a folder

One row deserves attention. A title made entirely of punctuation or emoji returns nothing at all: ... converts to an empty string. No option setting rescues a title containing no letters or digits.

The three conversions that surprise people

Apostrophes become hyphens. This one generates the most questions. Don't Stop: It's 100% Fine converts to don-t-stop-it-s-100-fine. An apostrophe is punctuation, and punctuation is not a letter or a number, so the rule treats it exactly like a space. If you want the apostrophe gone rather than hyphenated, remove it before pasting.

Underscores become hyphens. A headline like snake_case_name returns snake-case-name, because underscore is not a letter or a digit. The slug generator therefore doubles as a fast way to convert identifier case, which the case converter also does with an explicit kebab-case option.

Symbols can collide. C++ vs C# produces c-vs-c, because both ++ and # are punctuation. The plus signs and the hash are not softened, they are gone. Two different titles can land on the same slug, and the tool cannot warn you, because it only ever sees one title at a time.

Non-Latin scripts are preserved, not transliterated

Accents are stripped because NFKD decomposes them into a base letter plus a mark. Letters that are not accented versions of Latin letters have nothing to decompose into, so they survive untouched. 日本語のテキスト returns 日本語のテキスト, and Москва сегодня returns москва-сегодня.

That is deliberate honesty rather than a gap. Romanising Japanese properly requires a system and a set of judgement calls (Hepburn against Kunrei, long vowels, particles) that a browser-side converter has no business guessing at, because a wrong guess produces a slug the author cannot read back.

The practical consequence: such a slug is a valid URL path segment. Browsers display it in readable form and percent-encode the characters to UTF-8 bytes when the link is transmitted.

Hyphens, stopwords, and length

Hyphens beat underscores on the web, and not for aesthetic reasons. Search engines treat a hyphen as a word separator and have historically not treated an underscore the same way, so coffee-grinders reads as two words to a crawler while coffee_grinders can read as one lump.

The stopword question has a flat answer here: this generator does not remove "a", "the", or "of". Café Notes: A Better Way to Write keeps its "a". Deleting short words is a judgement about meaning, and a rule that drops "the" also mangles titles where it carries weight. Case conventions more generally are better served by the title case versus sentence case comparison than by a delete-the-small-words rule.

Length is the same story. This tool never truncates, because truncating automatically is worse than the problem it solves: a slug cut mid-word (a-better-way-to-wr) is unreadable. The only ceiling is the 200,000-character input limit shared by every field on the site, which no headline will ever approach. If a slug is too long, drop a word yourself.

Slugs are cheap to generate and expensive to change

The asymmetry is the whole point. Generating a slug costs one paste. Changing a published slug costs every inbound link, bookmark, and saved search result pointing at that address, plus whatever ranking history the page had built. If you do change one, the old path needs a permanent redirect, and that redirect has to outlive your patience for maintaining it.

So the time to be careful is before publishing. Paste the headline, read the output, and check it against three questions:

  • Does it read as words, or as a wall of hyphens?
  • Would a stranger know what the page is about with no headline attached?
  • Does it contain a year or a version number that will be wrong later?

That last one catches more problems than the other two combined. spring-2026-update is accurate for six months and misleading forever.

Frequently Asked Questions

Why did my apostrophe turn into a hyphen?

An apostrophe is punctuation, and punctuation becomes a hyphen during the separator step, so It's becomes it-s. Strip apostrophes from the headline before pasting if you would rather they vanished entirely.

Should I delete stopwords like "the" and "of" myself?

Sometimes, but it is a coin flip on meaning. Short words cost nothing in the address bar. Try it both ways and keep the version that reads like a phrase rather than a keyword list. This tool never removes them for you.

Can I use a slug in Japanese, Cyrillic, or Greek?

Yes. Non-Latin letters have no accent to decompose, so they pass through unchanged while everything around them is converted. The result is a valid URL segment, and browsers display it in its original script.

How long should a slug be?

Short enough to read at a glance, usually three to six words. Nothing here truncates, so the tool returns whatever length your headline produces, up to the 200,000-character input ceiling that applies to every field. The fix for a long slug is manual editing, not truncation.

What if two different titles produce the same slug?

Then two pages compete for one address, and the tool cannot tell you, because it sees one title at a time. Collisions are common with symbol-heavy titles: C++ vs C# reduces to c-vs-c. Search your own site for duplicates before publishing.

Does changing a slug after publication break anything?

It breaks every existing link, including the ones you never knew about. A permanent redirect from the old path to the new one is the standard repair and has to stay in place indefinitely. Decide the slug once and treat it as permanent.

Check the slug against your own site before you publish

The transformation is deterministic, so the real work happens after the box produces its output. Copy the slug, search your site for it, and confirm nothing else already lives at that address. Then read it as a stranger would, with no headline above it. If it still says what the page is, publish it and leave it alone.