acento.io
Text utility

URL Slug Generator

Turn any text into a clean, URL-safe slug — accent transliteration, configurable separator, and max length, all processed in your browser.

By Carlos Suárez , Systems engineer
Last updated:

What this URL slug generator does

This English-language URL slug generator converts any human-readable title into a string that's safe to paste directly into a browser address bar, a CMS route field, or a filename. It applies Unicode normalization (NFD), strips combining diacritical marks, and maps common Latin-extended characters to their ASCII base: à becomes a, ø becomes o, ß becomes ss, and so on. German umlauts (ä, ö, ü), Nordic ligatures (æ, å), French accents, and Spanish ñ are all handled. What it won't silently mangle: if your input contains Cyrillic, Chinese, Arabic, or other non-Latin scripts, those characters are stripped rather than replaced with garbled guesses — you'll see exactly what was dropped. The Oxford English Dictionary tracks roughly 600,000 word forms in English alone, so the variety of input you might need to slugify is enormous. This tool keeps it honest. 100% client-side — your data never leaves your browser. No uploads, no tracking, no server logs.

Features

  • Accent and diacritic transliteration. Runs NFD normalization then strips combining marks, mapping accented Latin characters to their closest ASCII equivalent before building the slug.
  • German, Nordic, and French character support. Handles ß→ss, ä→ae, ö→oe, ü→ue, æ→ae, å→aa, ø→o, ç→c, and ñ→n via explicit lookup before the generic strip pass.
  • Kebab, snake, or dot separator — or none. Choose - (kebab-case, the WordPress and RFC 3986 default), _ (snake_case, preferred by Drupal and some Python frameworks), . (dot notation), or no separator at all.
  • Configurable max length. Set a hard character ceiling so slugs never exceed your CMS or database column limit. The cut happens at a word boundary when possible.
  • Lowercase toggle. Force all output to lowercase (recommended for canonical URLs) or preserve the original casing when your routing layer is case-sensitive.
  • Transparent non-Latin stripping. Rather than producing broken transliterations, Cyrillic, CJK, Arabic, and other non-Latin scripts are removed and the result is clearly shown — no silent data loss.

How to use the URL slug generator

Paste your text, adjust the options, and copy the result — the slug updates live as you type.

  1. Paste or type your text. Enter any title, headline, or phrase in the input field. Example: Café résumé — déjà vu.
  2. Pick your separator. Select - for kebab-case (most CMS platforms and CDNs expect this), _ for snake_case, . for dot-separated paths, or none for a compact string.
  3. Set a max length if needed. If your platform imposes a URL length limit, enter a number in the Max length field. The tool trims at the nearest word boundary.
  4. Copy the slug. Click Copy and paste directly into WordPress, Ghost, Contentful, your router config, or wherever you need a clean slug.

Common use cases

  • Blog post and CMS URLs. Turn editorial titles like "What's New in Austin's Tech Scene — Q2 2025" into whats-new-in-austins-tech-scene-q2-2025 before pasting into WordPress or Ghost. A consistent SEO slug generator workflow keeps your URL structure clean across hundreds of posts.
  • Sanitizing user-provided route input. When users name their own profile pages, project boards, or team channels, run the input through a slugify step before writing to the database. This prevents reserved characters, spaces, and encoding issues in routing.
  • Generating filenames from arbitrary strings. Scripts that create files from dynamic titles — reports, exports, generated assets — need safe filenames. The slug output is safe on Linux, macOS, and Windows without extra escaping. If you also need to compare before and after a rename, the [text diff](/en/text-diff/) tool can show exactly what changed.
  • Multilingual content pipelines. When publishing French, German, or Spanish content to an English-language CMS that only supports ASCII routes, use this tool to transliterate the localized title into a clean slug while keeping the display title intact.
  • ID generation within a known scope. Slugs work as human-readable IDs when uniqueness within a collection is enforced at the application layer — tags, categories, product handles. For globally unique IDs, pair with a MDN — crypto.randomUUID call as a suffix.

Frequently asked questions

Does this tool send my text to a server?

No. All processing runs in your browser via JavaScript. Nothing is uploaded, logged, or stored anywhere. You can disconnect from the internet after the page loads and it still works.

Why does my Cyrillic or Chinese text disappear in the slug?

This tool handles Latin-script diacritics reliably, but non-Latin scripts require a full ICU transliteration library to map characters meaningfully. Rather than produce a broken or misleading result, non-Latin characters are stripped so you can see exactly what was lost. For Cyrillic or CJK input, a dedicated ICU-based tool is the right choice. The MDN — Intl.Segmenter API is a good starting point if you're building your own.

Should I use dashes or underscores in URL slugs?

Dashes (kebab-case) are the widely recommended default for public URLs. Google has historically treated hyphens as word separators and underscores as joiners, which matters for how individual words in your slug are indexed. WordPress, Ghost, and most modern CMSs default to dashes. Underscores are common in Drupal, Python module names, and some database-backed systems. Pick the one your platform expects. If you need to change casing as well, the [case converter](/en/case-converter/) handles that separately.

What's the best max length for an SEO slug?

Shorter is better for readability and shareability. Most SEO guides suggest keeping slugs under 60–75 characters. Long slugs aren't penalized outright, but unnecessary stop words and filler dilute the keyword signal. As a rough guideline, aim for the fewest words that still describe the page uniquely within your site.

How is this different from just lowercasing and replacing spaces with dashes?

A naive replace handles ASCII just fine, but breaks on accented characters. Without NFD normalization and combining-mark stripping, é stays as %C3%A9 in the URL (percent-encoded), which looks ugly, is harder to type, and can cause duplicate-URL issues across browsers that normalize differently. This tool handles the Unicode pipeline correctly so the output is clean ASCII.

Can I use the slug output as a database primary key?

You can use it as a human-readable unique key within a scoped collection (e.g., slugs are unique per blog, not globally). For cross-system uniqueness, slugs are not safe as primary keys because two different titles can produce the same slug. Enforce a unique constraint at the database layer and append a short suffix on collision.