Skip to content
Dev Utilities

Slugify

Turn any text into a URL-safe slug

Options

Text handling
Scripts with no Latin form (CJK, Cyrillic, Arabic, …)
0 chars
0 chars

What this does and does not do

  • Accents are removed by decomposing the text with normalize("NFKD") and then deleting every combining mark, so Crème becomes creme without a lookup table. NFKD also folds compatibility forms: fi, 1, full-width A.
  • A short table covers the Latin letters NFKD cannot decompose because they are separate letters, not decorated ones: ß→ss, æ→ae, ø→o, ł→l, þ→th.
  • Non-Latin scripts cannot be slugified this way. Romanising Chinese, Russian, Arabic, Greek, Hebrew or Japanese is a per-language choice with competing standards, and Japanese additionally needs a dictionary because the reading is not in the characters. Use the setting above to choose between dropping and encoding, and transliterate upstream if you need real words.
  • Emoji and symbols are treated as word separators, not dropped silently into the middle of a word.
  • One slug gives you a clean string to copy. Switch to One slug per line to see, per line, exactly how many characters were dropped or percent-encoded and which stop words were removed.