/tools/slug-generator

Slug Generator

Convert a headline into the URL segment that should sit under it. Accented characters are transliterated rather than dropped, so nothing turns into an empty slug.

Slug GeneratorRuns in your browser

0 means no limit


How to use the Slug Generator

  1. Paste a title. Add several lines to convert a batch at once.
  2. Choose a separator and, if you want, a maximum length. Truncation snaps back to a word boundary rather than cutting mid-word.
  3. Press Generate slug and copy the result.

What makes a good slug

A slug is the human-readable part of a URL. Good ones share a few properties:

  • Lowercase. Some servers treat URLs as case-sensitive, so mixed case creates duplicate addresses for one page.
  • Hyphens, not underscores. Search engines have long treated hyphens as word separators and underscores as joiners.
  • Short but meaningful. Three to six words is a good target. The slug should make sense read on its own.
  • Stable. Changing a slug breaks every existing link. If you must change one, redirect the old address.

Do not put a date in a slug unless the content is genuinely tied to a date — it makes an article look stale the following year.

Transliteration versus deletion

Naïve slug functions strip anything that is not a–z, which turns "Café" into "caf" and a Greek headline into nothing at all. This tool normalises to NFKD first, separating accents from their base letters so the accents can be removed while the letters survive: café → cafe, naïve → naive, Zürich → zurich.

Ligatures and letters with strokes need explicit mapping, since decomposition does not cover them — ß becomes ss, æ becomes ae, ø becomes o. Non-Latin scripts cannot be handled this way at all. Cyrillic, Greek, Arabic and CJK need real romanisation, so the tool warns you rather than silently producing an empty slug.

Should stop words be removed?

Removing "the", "of" and "a" makes slugs shorter and denser. It also makes some of them read oddly — "how-to-make-bread" becomes "how-make-bread". Search engines handle both fine, so this is a readability decision rather than a ranking one.

The option is off by default. When it is on, the tool keeps the original words if removing stop words would leave nothing behind.

Frequently asked questions

Hyphens or underscores?

Hyphens, for anything public-facing. Google has stated it treats hyphens as word separators and underscores as joiners, so my_blog_post may be read as one long token.

How long should a slug be?

Long enough to describe the page, short enough to read at a glance. Under 60 characters is a reasonable ceiling; there is no technical limit that matters at these lengths.

Why is my slug empty?

The input contained no Latin letters or digits after transliteration — usually a title in a non-Latin script or one made only of punctuation. Romanise it manually, or write an English slug.

Can I convert a whole list at once?

Yes. Put one title per line and each is converted separately, keeping the same order in the output.

Related tools