Slug Generator

Turn a title or sentence into a clean, SEO-friendly URL slug.

Advertisement

What a slug is and what this does

A slug is the readable tail of a URL, the part that names the page in words rather than an identifier: /tools/slug-generator rather than /tools/p_1934. A good slug is lowercase, uses hyphens between words, and contains nothing that has to be percent-encoded. This tool takes a title or heading and reduces it to exactly that form.

Four transformations are applied in order. The text is lowercased. Every character outside a to z, 0 to 9, space and hyphen is deleted. The remaining string is trimmed of whitespace. Runs of whitespace then become a single hyphen, and runs of hyphens collapse to one. Because trimming happens before hyphens are formed, a title that merely ended in a space produces no trailing hyphen; a hyphen typed in the source, however, can survive at the edge, so glance at the output before you paste it.

Why hyphens rather than underscores

Search engines treat a hyphen as a word separator and have historically treated an underscore as a joiner, so /coffee-shops reads as two words and /coffee_shops can read as one. Hyphens are also what people type when they guess a URL, and what most content systems generate by default. Consistency matters more than the choice itself, but switching a working site to underscores would change every indexed URL, so the convention is worth fixing early.

Worked example

Take the title 10 Best Coffee Shops in London (2026 Guide). Lowercasing changes nothing visible. Removing characters outside the allowed set drops the opening bracket, the closing bracket and the four digits inside it stay because digits are permitted, so the string becomes 10 best coffee shops in london 2026 guide with a double space where the brackets stood. Squeezing whitespace turns each gap into one hyphen, giving 10-best-coffee-shops-in-london-2026-guide.

A second case shows an important limit. Take Cafe and Creme with an acute accent on the first e and a grave accent on the second. Those accented letters are not in the allowed set, so they are deleted rather than transliterated, and the slug comes out as caf-crme. The same thing happens with Cyrillic, Greek or Arabic titles, which can reduce to almost nothing. If you need a readable slug for a non-English title, write a transliterated title first and run that instead.

Limits and what to check afterwards

The tool has no length cap. Long titles produce long slugs, and while length is not a ranking factor, very long URLs get truncated in search results and are hard to share aloud. There is no stop-word removal either, so in, of and the stay in place. Neither omission is a defect: they leave the decision with you.

Uniqueness is your responsibility. Two posts called Weekly Update will generate the same slug, and most content systems will then append a number or reject the second. Existing redirects, reserved paths such as admin or api, and the site's own routing rules are outside the tool's knowledge. After generating a slug, percent-encode it only if it contains something unusual, which the URL encoder and decoder handles; check the title length against display limits with the AdSense SEO checklist; and use the case converter when you need the original title in title case for display.

Frequently asked questions

Hyphens are read as word separators by search engines, underscores are not. Hyphens are also easier to say aloud and to type from memory.
Only basic Latin letters and digits survive the filter, so accented characters are deleted rather than converted. Transliterate the title first if the slug must stay readable.
No. Two similar titles produce the same slug. Your content system, not this page, has to detect the collision and add a suffix.
The tool does not impose one. Keep slugs short by trimming the title before converting, since long URLs are truncated in search results and awkward to share.