Slug Forge

Turn any title or filename into a clean, URL- or filename-safe slug. Everything is computed in your browser.

100% client-side

Scope: this tool transliterates Latin-script accented letters (á, é, ñ, ü, ç, ...) — Spanish, French, German, Portuguese and similar. It does not transliterate non-Latin scripts (Cyrillic, Greek, Arabic, CJK, etc.) or emoji — in both modes above, those characters are removed the same way a symbol is, not mapped to a Latin equivalent.

Text to slugify

0 characters

Slug

What is a slug?

A slug is the short, plain-text identifier used in a URL path or a filename — the part that's safe for browsers, filesystems and command lines to handle without escaping: lowercase letters, digits and a single separator character, nothing else. Turning a human-written title like "Café de la Résistance — Grand Opening 2026!" into a slug by hand means manually removing accents, punctuation and spaces every time; this tool does it instantly and consistently.

How to use Slug Forge

  1. Type or paste a title or filename into the Text to slugify field (or click Example).
  2. Pick a Separator, Letter case, and how Accented characters should be handled.
  3. Optionally set a Max length to cap the slug's length, e.g. for a filesystem or database column limit.
  4. Read the result in the Slug panel and click Copy to grab it.

How slug generation works

This tool uses the browser's native Unicode normalization (String.prototype.normalize('NFD')) to split an accented Latin letter into its base letter plus a separate "combining mark" for the accent — for example "é" decomposes into "e" plus a combining acute accent. Dropping that combining mark is what turns "é" into a plain "e" in Transliterate mode. In Strip mode, no decomposition happens at all: an accented or non-Latin character is removed as a whole, undecomposed character instead of being reduced to a base letter. Every other symbol, space, or character outside this tool's scope becomes a word break, and consecutive breaks collapse into a single separator:

// Before
Café de la Résistance — Grand Opening 2026! 🎉

// After (Transliterate, hyphen, lowercase)
cafe-de-la-resistance-grand-opening-2026

// After (Strip, hyphen, lowercase)
caf-de-la-r-sistance-grand-opening-2026

// After (Transliterate, underscore, lowercase)
cafe_de_la_resistance_grand_opening_2026

// After (Transliterate, hyphen, lowercase, max length 24)
cafe-de-la-resistance-gr

The trailing emoji is dropped cleanly in every mode: it's stored internally as a two-part "surrogate pair", and this tool always processes text by whole character (Unicode code point) rather than by raw text-index, so a surrogate pair can never be split in half into garbled output. Max length truncation happens last, on the already-ASCII-only slug, and any separator left dangling right at the cut point is trimmed off so a slug never ends with a stray "-" or "_".

Frequently asked questions

Is it safe to paste titles or filenames with sensitive information into this tool?

Yes. All processing happens in your browser using native JavaScript; nothing you type is ever sent to a server.

What's the difference between Transliterate and Strip accent handling?

Transliterate converts an accented Latin letter to its closest unaccented equivalent, so "café" becomes "cafe". Strip removes the accented letter entirely instead of substituting it, so "café" becomes "caf" — useful when you'd rather drop an ambiguous character than guess at a replacement.

Does this tool transliterate non-Latin scripts like Cyrillic, Greek or Chinese characters?

No. This tool's scope is Latin-script text with accents and diacritics (Spanish, French, German, Portuguese and similar), which covers the large majority of real-world slugs. Non-Latin scripts — Cyrillic, Greek, Arabic, CJK and so on — are not transliterated in either mode: those characters are simply removed, the same as any other symbol, instead of being mapped through a large per-script table.

What happens to emoji or other special characters?

They're removed cleanly as a whole character and treated as a word break, the same as a space or punctuation mark. An emoji is stored internally as a two-part "surrogate pair", and this tool always handles that pair as one unit so it never gets cut in half into garbled text.