onlinetools.dev

Slug Generator

Turn titles into clean URL slugs with separator and length options

Runs locally
loading…
About this tool

Turn any title into a URL-ready slug: lowercase, hyphen-separated, stripped of punctuation, with accents transliterated to plain ASCII — "Crème brûlée à Paris" becomes "creme-brulee-a-paris". Options cover the common variations: underscore separators, preserved casing, and a maximum length that cuts at a word boundary instead of mid-word.

Slugs matter for both humans and search engines: they are readable in the address bar, survive copy-pasting into chat without percent-escaping, and give search results a keyword-bearing URL. The transliteration step is what most homemade slugify functions skip — without it, accented titles either break URLs or vanish entirely.

Each line slugifies independently, so a pasted list of article titles becomes a matching list of slugs in one operation.

Frequently asked questions

Why hyphens instead of underscores?
Search engines treat hyphens as word separators but historically treated underscores as word joiners, and hyphens are visually clearer in underlined link text. Underscores remain popular for file names and identifiers, so both are offered.
What happens to non-Latin scripts like Chinese or Cyrillic?
Characters with ASCII equivalents (accented Latin, a few special letters like ß → ss) are transliterated; scripts without a simple Latin mapping are removed. For non-Latin content, common practice is either keeping the native script percent-encoded in the URL or writing a manual romanized slug.
Is there an ideal slug length?
Shorter is better for sharing and display, but there is no ranking cliff. The max-length option trims at a word boundary — useful for CMSes that cap slug columns at 50–80 characters.
Should the slug change when the title changes?
Once published, ideally not — the URL is an address others have linked to. Most sites keep the original slug or add a redirect. Generate slugs at creation time and treat renames as a deliberate redirect decision.
Related tools