What a slug actually is
A slug is the readable part of a URL that names one page — the how-to-build-a-website in example.com/blog/how-to-build-a-website. It is not the title and it is not an id, but a short, stable label a reader and a crawler can both make sense of at a glance.
How to Build a Website! → how-to-build-a-website — spaces become the separator, the ! is dropped, and the case is folded
Which makes a slug generator mostly a set of decisions rather than an algorithm: what joins the words, whether the accents survive, how long is too long. Only four marks pass through a URL untouched — -, _, . and ~ — so those are the separators on offer, and everything else RFC 3986 either reserves or percent-encodes, which is how a space becomes %20. Every character is transformed in this tab; nothing you type is uploaded.
Choosing a separator
The separator is the only character that appears between words, so it is the one choice that shows up in every slug you make. All four below are unreserved, so none of them is ever escaped and none of them can break a link.
| Character | What it signals | Reach for it when |
|---|---|---|
| - | The web's default. Search engines have read it as a word boundary for as long as they have parsed URLs. | Almost always — articles, docs, product pages, anything someone might read aloud. |
| _ | Just as safe, but historically read as part of a word rather than a break between two. | File names, database identifiers, and anywhere the slug has to match a symbol in code. |
| . | Legal in a path segment, and also how file extensions are written. | Rarely — it can make the last word look like a file type. |
| ~ | Unreserved and uncommon, which is exactly what makes it unambiguous. | Internal or generated links, where you want the shape to stand out from editorial ones. |
Choosing Custom hands the field over: type up to three characters and the words are joined with exactly what you typed, so a double dash or an underscore between dashes is yours to make. An empty field is a real answer too — it runs the words together, which is what onelongword needs.
The field accepts only those four marks. Type a space, an ampersand or a slash and the tool names the character and stops, rather than handing back a slug that a URL would immediately percent-encode into something nobody can read.
Every option, and what it costs
Seven controls, and no hidden behaviour behind any of them. The defaults produce the shape most publishing tools expect, so the fastest way to use this page is to type a heading and copy the result.
| Option | What it does | Reach for it when |
|---|---|---|
| Separator | The character placed between words, chosen from four presets or typed by hand. | Set it once and forget it. The dash suits nearly every public page. |
| Lowercase | Sends the whole slug to lower case, using the invariant rules rather than your device's locale. | Leave it on. A URL path is case-sensitive, so /About and /about are two pages to a crawler. |
| ASCII only | Folds accents to plain letters, spells out letters such as ß and æ, then drops whatever has no ASCII form. | On, unless the slug has to keep letters from a script that ASCII cannot represent. |
| Drop English stop words | Removes about thirty function words — a, the, of, with — once the heading has been split. | Long headings that would otherwise make a slug nobody reads to the end. |
| Drop numbers | Strips every digit, and with it any word that was only digits. | Titles carrying a year or a count you would rather not freeze into the URL. |
| Maximum length | Caps the slug, cutting on a word boundary instead of mid-word. Zero removes the cap. | A house style fixes a limit; 60 to 80 characters is a common one. |
| One slug per line | Treats each input line as its own heading and answers with one slug per line, blanks included. | Converting a list of titles, a sitemap or a spreadsheet column in one pass. |
The order the steps run in is fixed, and it shows up in the output. The text is normalised and folded first, then split into words, then digits go, then the case changes, then stop words are dropped, and only then are the words joined and cut to length. That is why dropping numbers can remove a whole word — 2026 has nothing left once its digits go — while html5 simply becomes html.
The ceiling counts the separators it emits, not only the letters, and in bulk mode it is spent per line rather than across the batch. A single word longer than the whole budget is cut rather than dropped: half a word still points at the right page, and nothing at all does not.
The defaults are a dash, lowercase, ASCII only, no filters and no ceiling. If a combination leaves nothing behind, the tool says so instead of handing back an empty slug that looks like it worked.
Accents, and everything ASCII cannot hold
ASCII only does two jobs. First it decomposes the text, so é becomes a plain e with a separate accent mark that is then discarded — the same trick handles ü, ñ, å and the rest of the accented Latin range. Then it spells out the letters that have no accent to remove, because they were never accented letters: ß is not an s with a mark, so it becomes ss, while æ becomes ae, ø becomes o and þ becomes th.
What it does not do is romanise. Bangla, Chinese, Cyrillic, Greek, Arabic and Hebrew have no single agreed spelling in Latin letters — the answer depends on the language, and often on the country. Rather than guess on your behalf, the tool drops what it cannot fold, and tells you plainly when nothing survived.
Switch ASCII only off and those letters stay. Every modern browser and host accepts them: the link is percent-encoded on the wire and shown as the original letters in the address bar. It is a real choice, not a fallback — a Bangla heading gets a Bangla slug, and combining vowel marks stay attached to their consonants instead of being treated as word breaks.
Where slugs show up
Slugs turn up wherever a machine needs a name a person also has to read: article and documentation routes, product and category pages, anchor ids inside a long page, branch names, files in a repository, and the keys in a translation catalogue.
Two habits are worth more than any option here. Keep a slug stable once it is published — changing it breaks every link that pointed at the old one, so the fix is a redirect rather than an edit. And keep it short enough to survive being pasted into an email, a chat message or a printed page.
If what you actually need is a link whose destination can change later, that is a different job: the URL Shortener makes a short address you can re-point after it has been shared.
Frequently asked questions
learn-css reads as two words where learn_css can read as one. The difference is smaller than it once was, but the safer choice costs nothing.nextjs, take the dot out of the heading first, or edit the result — this is a deliberate call rather than a guess about which dots are meaningful.