LocalToolkit
HomeText Tools › URL Slug Generator

URL Slug Generator

A readable, stable, lowercase slug — with the words that do not belong in a URL removed.

🔒 Runs in your browser. Nothing is uploaded — verify it in the network panel, or disconnect and try again.

What a slug is for

A slug is the human-readable tail of a URL. /blog/best-noise-cancelling-headphones-2026/ tells a reader and a crawler what the page is about before either one fetches it, and it is the fragment people read when a link is pasted into a chat window. Its job is comprehension and stability, not keyword stuffing.

The rules that matter, in order

  1. Lowercase everything. URLs are compared case-sensitively on many servers, so /About and /about can be two different pages, one of which 404s.
  2. Separate words with hyphens. Google treats - as a word separator; _ is not reliably treated the same way, so noise_cancelling may be read as one token.
  3. Strip accents rather than encoding them. café becomes cafe, not caf%C3%A9. Percent-triplets in a slug are unreadable and double-encoded when someone copies the URL.
  4. Drop punctuation entirely. Apostrophes, commas and quotes carry no meaning to a parser and get escaped inconsistently.
  5. Remove stop wordsa, an, the, of, for — when the slug is long. Keep them when removing one makes the phrase ambiguous.
  6. Keep it short. Five meaningful words is a good ceiling; long slugs get truncated in search results.

Why slugs should never change

A slug is a permanent identifier in practice. Inbound links, shares, bookmarks and external citations all point at the exact string. Changing it breaks every one of them unless you serve a 301 redirect from the old path. The rule that saves the most pain: choose the slug from the topic, not from the working title. how-to-fix-a-leaky-tap survives a headline rewrite; new-post-3 never had a chance.

Transliteration and non-Latin scripts

Do not stuff keywords into a slug. Search engines read the slug as a weak signal, and a reader sees an obviously machine-generated address. One clear phrase beats six keywords separated by hyphens.

How to use it

  1. Paste your title or phrase.
  2. Choose whether to strip accents, remove stop words, and cap the word count.
  3. Copy the slug.
  4. Attach it to a path that will not change, and redirect old paths with a 301 if you ever do.

Worth knowing

  • Google treats hyphens as word separators; underscores are handled less reliably.
  • Accented characters should be transliterated, not percent-encoded, inside a slug.
  • Search results truncate long URLs, so five words is a practical ceiling.
  • Changing a live slug requires a 301 redirect from the old path.

Limitations

  • No slug can guarantee uniqueness — a suffix or a directory is still needed for collisions.
  • CJK slugs must be percent-encoded on the wire and read poorly when copied.
  • Stop-word removal can change meaning when a stop word carries the contrast in a phrase.
  • Romanisation conventions differ between languages, so results are conventional rather than canonical.

Frequently asked questions

Should I use hyphens or underscores in a URL?
Hyphens. Search engines treat - as a word boundary; _ is often read as part of a single token, so the words in noise_cancelling may not be recognised individually.
How long should a slug be?
Short enough to read at a glance — around five meaningful words. Search result URLs get truncated beyond roughly 70 characters, and long slugs dilute rather than help.
Can I change a slug later?
You can, but every existing link breaks unless the server returns a 301 from the old path. Plan the slug from the topic rather than the draft headline so it does not need to change.
Should non-English characters be kept or removed?
For Latin scripts, transliterate — it produces readable, stable addresses. For CJK, keeping the characters is viable because browsers handle them, but they must be percent-encoded on the wire and are awkward when copied by hand.
Related tools
Case ConverterURL Encoder / DecoderWord and Character CounterRemove Duplicate LinesSort LinesLorem Ipsum Generator
Keep reading
How browser-only processing worksAll Text Tools toolsEvery tool on the site