Slugify

Turn any text into URL-safe slug. Handles Vietnamese diacritics, German ß, French accents, emoji.

Loading the tool…

What next?

How it works

What a slug is

A slug is the human-readable, URL-safe portion of a URL — /blog/my-post-title has slug my-post-title. It identifies the resource and contributes to SEO (Google reads slug words). It must be ASCII-safe, lowercase by convention, and use a separator that browsers won't mangle (- wins).

The transformation from arbitrary text to slug involves three steps:

  1. Transliterate non-ASCII characters into ASCII equivalents (café → cafe, Tiếng Việt → tieng-viet, Schöner Tag → schoner-tag).
  2. Normalize whitespace and punctuation to your chosen separator.
  3. Lowercase (almost universally — search engines case-fold URLs anyway).

This tool handles all three. Pick the right locale for the input text so transliteration uses the right rules — Vietnamese ư is u, not w; German ü is ue traditionally but u is more common in modern URLs.

Why hyphen over underscore

Google indexes hyphens as word separators (my-blog-post = three words) but underscores as joiners (my_blog_post = one word). For SEO, always use hyphen in URL slugs. Underscores are fine for filenames or identifiers, not URLs.

Diacritics: strip or transliterate

Two schools of thought:

  • Strip: Café → caf. Loses the é entirely. Wrong — drops a letter.
  • Transliterate: Café → cafe. Keeps the letter, drops the diacritic. Right.

This tool transliterates. For Vietnamese, the locale-specific map turns đ → d (the standard slugify library handles the rest of Vietnamese diacritics via NFD normalization).

Length and SEO

Most SEO guidance lands on 3–5 words for the slug (~30–60 characters). Longer slugs aren't penalized but are uglier in social shares. Don't pad with stop words ("the", "a", "an") — they add length without meaning.

Use cases

  • Generating URL paths for CMS-driven content
  • Building filenames from human titles
  • Creating user-friendly IDs from arbitrary input
  • Bulk-generating slugs for an import batch (use the Bulk tab)

Privacy

All processing in your browser via slugify. No network requests.

Related

  • Text Case Converter — change to lowercase before slugifying, or invert order.
  • URL Encoder — for query parameters and full URL composition.

Frequently asked questions

Hyphen or underscore?

Hyphen. Google indexes hyphens as word separators and underscores as joiners — for SEO you almost always want word separation.

Should slugs keep diacritics?

Tech-wise yes (/café), SEO-wise no (/cafe) — most English audiences and most non-Latin browsers will see encoded %C3%A9 instead of é. Strip diacritics for portability.

What's the max slug length?

No hard limit, but ~60 characters is the practical ceiling for SEO (Google truncates display in SERPs after ~50–60). Stick to 3–5 meaningful words.

How does Vietnamese transliteration work here?

The underlying library transliterates standard Vietnamese diacritics via NFD normalization (ế → e, ư → u). We add a small map for special cases (đ → d) that NFD doesn't handle by default.

Slug for non-Latin scripts (Chinese, Japanese, Arabic)?

Pinyin/romaji transliteration is possible but not enabled here by default. For Chinese: use a pinyin library before slugifying. For Japanese: romaji conversion. For Arabic: transliteration is debatable — many sites just keep the original characters URL-encoded.

Why does my slug still contain an exclamation mark?

Because a few punctuation characters survive unless you tick strict. By default Hello World!! 2026 becomes hello-world!!-2026; with strict on, the set *+~.()'"!:@ is stripped and you get hello-world-2026.

Most punctuation is already removed without strict — What? Really! gives what-really!, so the question mark goes while the exclamation mark stays. Strict is off by default because removing characters is destructive, but for anything going into a URL, turn it on.

Why did & turn into the word "and"?

Because the underlying slugifier transliterates symbols into words rather than deleting them, so a/b&c becomes abandc. This happens in both modes. If you want the symbol gone rather than spelled out, remove it before slugifying.

AnyLearn, the study app in AnyTools

Upload what you are learning from. Get answers that cite the page, quizzes written from it, and reviews timed to just before you forget, on your own AI account.

Open AnyLearn