Skip to the tool

Slugify

MDV Tools

Paste a title. Get the slug that goes in a URL: accents folded to plain letters, everything that is not a letter or digit turned into the separator, repeats collapsed.

Runs on this device Works offline
0 characters
0 means no limit. A limit cuts at a word boundary.
Slug
paste a title above
How this works

Each line — or the whole text, with "one slug per line" off — is first folded to ASCII unless "Keep Unicode letters" is on. String.prototype.normalize("NFKD") splits every accented letter into its base letter plus combining marks, a \p{M} regex strips the marks, and a table of 23 entries handles the letters NFKD leaves whole: ß→ss, æ→ae, œ→oe, ø→o, đ→d, ð→d, þ→th, ł→l, ħ→h, ı→i, ŀ→l, ŧ→t and their capitals. NFKD also flattens ligatures and full-width forms, so fi becomes fi and 1 becomes 1. Then, if lowercase is on, toLowerCase. Every run of [A-Za-z0-9] becomes one part and the parts are joined with the separator, so punctuation, spaces and emoji vanish, repeats collapse, and nothing leads or trails.

Nothing else is transliterated. Cyrillic, Greek, Arabic, Hebrew, Chinese, Japanese, Korean, Devanagari and every other non-Latin script have no ASCII form in this tool and are dropped; the page counts the dropped letters and says so above the slug. "Keep Unicode letters" skips the folding and keeps any \p{L}, \p{N} or \p{M} character as typed — a legal slug, but one that browsers show percent-encoded in some places. Max length keeps whole parts up to the limit, measured as String.length; when the first part alone is longer than the limit it is cut mid-word.

Input above 2,000,000 characters is refused rather than attempted, so the tab never hangs. Nothing is uploaded: there is no server in this file.

The Dark button remembers its setting in this browser's local storage. Nothing you type or drop into the page is stored.