A slug generator that survives accents and smart quotes

Every slug generator lowercases and replaces spaces with hyphens. The ones that cause trouble are the ones that stop there, because a headline copied out of a word processor contains at least three characters that look like ordinary punctuation and are not.

Open the Slug Generator →

Slugify and Softland, side by side

 SlugifySoftland
Lowercase and hyphenateYesYes
Accented Latin charactersVariesFolded to their base letters - cafe rather than a dropped word
Smart quotes, em dashes, ellipsesOften passed through or percent-encodedRemoved before they reach the URL
Non-Latin scriptsSome tools transliterateNot transliterated - see below
Where it runsIn the pageIn the page

The characters that break a link are invisible

A headline written in a word processor does not contain the apostrophe on your keyboard. It contains a right single quotation mark, and the dash is an em dash, and the three dots are a single ellipsis character. All three look normal in the title and all three percent-encode into a URL that is ugly at best and broken at worst when it is pasted into a chat client that stops escaping at the first unusual byte.

Folding accents matters for the same reason. A slug containing an accented letter is legal, but it will be percent-encoded in some contexts and not others, which means the same article can end up with two URLs that a crawler treats as two pages. Reducing it to the base Latin letter gives you one canonical, boring, portable string.

Hyphens rather than underscores, and why it still matters

Search engines treat a hyphen as a word separator and have historically treated an underscore as a word joiner, so my_first_post can be read as one token where my-first-post is three. The practical effect is smaller than it once was, but the convention has settled and consistency across a site is worth more than the difference either way.

The stronger argument is human. Underscores vanish under the underline that browsers put on links, so a reader cannot tell whether a URL has a separator there at all. Hyphens survive, which matters whenever a URL is read aloud, printed, or typed from a screenshot.

What this does not do

It folds accents; it does not transliterate. A Cyrillic, Greek, Arabic or Japanese headline will not come back as Latin letters, because transliteration is a language-specific problem with genuine disagreement about the right answer, and a generic implementation produces results that are wrong in ways their authors cannot see.

If you are publishing in a non-Latin script you have two reasonable options, and picking a tool that guesses is neither: use the script directly in the URL, which every modern browser handles and which readers of that language prefer, or transliterate with something built for that language specifically.

When Slugify is the better choice

  • You need transliteration from a non-Latin script into Latin characters, which this deliberately does not attempt.
  • You want a library rather than a page, to run the same rules inside your own build.
  • Your CMS already generates slugs and you want a tool matching its exact rules rather than a general one.

Frequently asked questions

Should a URL slug use hyphens or underscores?
Hyphens. They are read as word separators, and they stay visible under the underline browsers draw on links, where an underscore disappears entirely.
How are accented characters handled?
They are folded to their base Latin letters, so an accented e becomes e. That avoids one article acquiring two URLs because some contexts percent-encode the character and others do not.
How long should a slug be?
Long enough to say what the page is, short enough to read in a search result. Three to six meaningful words is the usual range - drop the filler words rather than truncating mid-phrase.
Can I change a slug after publishing?
You can, but every existing link to the old one breaks unless you redirect. If the page has been live and linked, keeping an inaccurate slug is often cheaper than the redirect chain that fixing it creates.

Try it yourself

Turn a title into a clean URL slug.

Open the Slug Generator

Slugify is a trademark of its respective owner. Softland is not affiliated with, endorsed by or sponsored by Slugify. This comparison reflects how each product works rather than what either costs, because pricing and plan limits change; check Slugify’s own site for its current terms.