PK Systems
Text tools

Slug Generator

Convert any title into a clean, ASCII URL slug. Live preview, diacritic-stripping, custom separator.

Slug Generator

0 = no limit. Long slugs are trimmed cleanly without leaving a trailing separator.

Slug

What is a slug?

A slug is the human-readable, URL-safe identifier at the end of a web address — the slug-generator piece of /tools/text/slug-generator. Good slugs are lowercase, ASCII-only, short, and use hyphens between words. They help search engines, screen-readers and humans understand what a page is about at a glance, and they survive copy-paste through messaging apps that mangle non-ASCII characters.

How to use this generator

Paste any title — including emoji, accents, punctuation, or multi-language text — into the box above. The slug updates as you type. Pick a hyphen or underscore separator (most blog and CMS engines prefer hyphen for SEO), and optionally cap the length if your routing layer enforces a limit. Hit Copy to put the slug on your clipboard.

Slug best practices

Keep slugs short and meaningful — a few keywords, ideally under 60 characters. Don't include stop words (the, a, of) unless they change meaning. Once a URL is published, never change the slug without setting up a 301 redirect; broken links cost you traffic and link equity. For internationalised content, generate the slug from the localised title rather than translating it after the fact, so the URL reflects what readers in that locale would search for.

Examples

Input Slug
Hello, World!hello-world
São Paulo & Riosao-paulo-rio
The 100 Best Booksthe-100-best-books
café—françaiscafe-francais
__Already_Slug__already-slug

Frequently asked questions

What does this tool do to my text?
It applies Unicode NFKD normalisation, strips combining diacritic marks, lowercases, replaces every non-alphanumeric run with your chosen separator, collapses duplicate separators, and trims leading/trailing separators. The result is a slug that's safe in URLs, filenames and most database keys.
Hyphen or underscore — which is better?
Hyphens, almost always. Google has explicitly recommended hyphens as word separators in URLs for years; underscores get treated as part of the word. The only places underscores win are filenames in older systems and some programming-language identifiers — neither of which is a typical slug use-case.
Will diacritics be stripped properly?
Yes. The tool runs Unicode NFKD then drops combining marks, so café becomes cafe, São Paulo becomes sao-paulo, and so on across Latin-derived alphabets. Non-Latin scripts (Cyrillic, Greek, CJK) are dropped entirely; for those, transliterate to ASCII first or pre-translate the title.
Does it run on a server?
No. Slugification runs entirely in your browser. You can confirm by opening DevTools > Network and typing into the input — no requests fire. This means it's safe to slugify private titles (draft post titles, internal documents) without leaking them.
What about emoji and symbols?
Anything that isn't a basic Latin letter or digit becomes a separator. Emoji, punctuation, currency symbols, hashes, ampersands — all replaced with hyphens (or underscores) and then collapsed. The result is always lowercase a-z, 0-9, and your chosen separator.
Why does the slug get trimmed at the end?
When a max-length cap kicks in mid-word, the cut would otherwise leave a trailing hyphen or underscore — ugly and slightly confusing. The tool trims any trailing separator after truncation so you always get a clean ending. If you need exact-length output without that cleanup, leave the cap at 0.