Slug generator
Convert titles and pasted lists into clean URL-safe slugs with diacritics removed, configurable separators, optional stop-word removal, and max-length truncation.
About the Slug generator
The slug generator turns a title or phrase into a clean, URL-safe slug: lowercase, with accents stripped and every run of non-alphanumeric characters collapsed into a single separator. You can switch the separator between a hyphen and an underscore, drop common stop words, cap the length, and process many titles at once in batch mode.
Slugs are the readable part of a URL, the bit after the last slash, and getting them right matters for clean links, SEO and tidy file names. Rather than hand-editing punctuation and spaces, you paste the human title and copy a slug that is safe to drop into a route, a filename or a CMS field, with the same rules applied consistently every time.
How to use it
- Type or paste a title into the input box, or switch on Batch mode and paste one title per line.
- Choose your separator with the Use underscores toggle: off gives hyphens, on gives underscores.
- Turn on Drop stop words to remove small words like 'a', 'the' and 'of' from the slug.
- Enable Max-length truncate and set a maximum if you need slugs capped to a length; the cut is tidied so it never ends on a separator.
- Click Copy slugs to copy the output, which keeps one slug per line in batch mode.
Examples
A headline into a hyphen slug
Input "A Developer's Guide to Clean URL Slugs" and you get "a-developers-guide-to-clean-url-slugs". The apostrophe and spaces are normalised, everything is lowercased, and words are joined with hyphens, ready to paste into a page path.
Stripping accents and stop words
With Drop stop words on, "Café de la Paix" becomes "cafe-de-paix": the accent on the e is removed, and 'la' is dropped as a small word while the meaningful words remain. Accent stripping uses Unicode normalisation so é reliably becomes e.
Batch slugs for a content import
Switch on Batch mode, paste twenty article titles one per line, and copy twenty matching slugs in the same order. This is the quick way to pre-generate URL paths before importing posts into a CMS, keeping naming consistent across the whole set.
Frequently asked questions
- Which characters survive in a slug?
- Only lowercase letters a to z and digits 0 to 9. Everything else, including spaces, punctuation and symbols, is converted to your chosen separator, and runs of them collapse into a single separator. Leading and trailing separators are trimmed off.
- How are accented and non-Latin characters handled?
- Accented Latin letters are decomposed and their marks removed, so 'é' becomes 'e' and 'ü' becomes 'u'. Characters that have no plain a-to-z equivalent are dropped rather than transliterated, which keeps the slug strictly ASCII and URL-safe.
- Which words count as stop words?
- When Drop stop words is on, the generator removes a short set of common function words: a, an, the, of, in and on. It is intentionally small so it shortens slugs without stripping out words that carry meaning for search.
- Why would I use underscores instead of hyphens?
- Hyphens are the usual choice for web URLs and are generally preferred for SEO, while underscores suit file names, some code identifiers and systems that treat hyphens specially. The toggle lets you match whatever the destination expects.
- How does max-length truncation avoid awkward cuts?
- When you cap the length, the slug is cut to the limit and then any trailing separator left by the cut is removed, so it never ends on a dangling hyphen or underscore. It trims to the limit rather than always breaking on a whole word.
Good to know
Consistency is the real value of generating slugs rather than typing them. Applying the same lowercasing, accent-stripping and separator rules every time means two editors describing the same article will produce the same path, which avoids duplicate URLs and broken links. Keeping slugs ASCII also sidesteps percent-encoding, so a link stays readable when copied, shared or logged.
A couple of cautions. Stripping stop words and truncating both change the slug, so if a slug is already published, regenerating it with different options will produce a new path and can break inbound links unless you add a redirect. And because non-Latin scripts are dropped rather than romanised, titles in languages outside the Latin alphabet can come out empty or very short; in those cases keep more of the original or supply a transliteration before slugging. Treat slugs as stable identifiers once they are live.