Turn text into a URL slug

Convert a headline into a lowercase, hyphenated URL slug, with accents folded and a length limit that cuts at a word boundary.

Turn text into a URL slug

0 characters

Three steps — nothing to install

  1. Paste the headline

    A title, a product name, or a phrase with accents.

  2. Choose the shape

    Hyphen or underscore, a maximum length, and whether to force plain ASCII.

  3. Copy the slug

    It is already lowercase, has no spaces, and ends on a word rather than mid-syllable.

What makes a good slug

A slug is the readable part of a URL: /en/compress-image-to-100-kb/. Lowercase letters, digits and hyphens are safe in every browser, every analytics tool and every chat client; spaces become %20, capitals create duplicate URLs, and punctuation gets escaped. Keeping it short helps people read it and keeps the URL shareable.

Put the words people search for in the slug, not the internal name. compress-image-to-100-kb says what the page does; tool-47-final-v2 does not. Once a page has traffic, changing its slug means adding a redirect from the old one, which is why it is worth getting right the first time.

Accents, other scripts and ASCII

Accents are decomposed and removed, so Café au lait becomes cafe-au-lait. The option to force ASCII also transliterates the letters that are not an accent on a Latin base: ß becomes ss, æ becomes ae, ø becomes o, ł becomes l.

Scripts that are not Latin are a real limitation. Chinese, Japanese, Arabic and Cyrillic text is dropped rather than transliterated, because a faithful transliteration needs a dictionary rather than a character table. If a slug would otherwise be empty, type a Latin title instead. Percent-encoded UTF-8 slugs work, but they are unreadable when shared.

Length limits, separators and cutting

The length limit counts characters, not bytes. When the slug is longer, it is cut at the last separator before the limit, so you get a whole word rather than half of one, and trailing separators are removed. Zero means no limit.

Hyphens are the convention and the safer choice, because underscores are invisible in underlined links and some chat clients italicise them. Underscores are still offered for sites that already use them. Apostrophes are dropped, so Karwar's beaches becomes karwars-beaches, which is the common convention and keeps the URL stable.

Frequently asked questions

Does it remove accents?Yes. Café becomes cafe, and ñ becomes n, before the slug is built.
What happens to Chinese or Japanese text?It is dropped, because the generator does not transliterate non-Latin scripts. Type a Latin title when the slug matters.
Can I limit the slug length?Yes. Set a maximum and the slug is cut at the last word boundary before it; zero means no limit.
Hyphen or underscore?Hyphens are the usual choice and survive underlining and italics in chat. Underscores are available for sites already using them.
Are numbers kept?Yes. Numbers are kept as they are, which matters for slugs like compress-to-100-kb.
Is my title uploaded?No. The slug is built in this tab with Unicode normalisation and a few string replacements.