The part generic slugifiers get wrong is ñ. The usual implementation normalises to NFD, strips combining marks, and keeps what is left — which turns ñ into n by accident, because ñ decomposes to an n plus a tilde.
That is right for é → e. ñ is different: it is a letter in its own right, not an n with a decoration.
Los Baños becoming los-banos is what you actually want in a URL. But the tool should say it made that substitution rather than performing it invisibly — because you may be slugging a personal name.
So transliteration is an option, not a silent default, and every substitution is listed.
It becomes n, and the page tells you it did. That is what you want in a URL — Los Baños becomes los-banos — but ñ is a letter in its own right rather than an n with a mark on it, unlike é or ü. A generic slug function that strips combining marks turns ñ into n by accident and never mentions it, which is fine for a blog title and worth knowing about for a personal name. You can turn the substitution off.
You can, and browsers handle it correctly by percent-encoding the character. The cost is that the URL reads as los-ba%C3%B1os when it is copied out of the address bar and pasted into a message or an email. Most sites transliterate for that reason, not because the alternative is broken.
Because separators are collapsed before the ends are trimmed, in that order. Doing it the other way round leaves a trailing hyphen whenever the text ends in punctuation — “Hello, world!” becomes hello-world- — which is the classic off-by-one of this function.
It cuts at a separator, never in the middle of a word. A slug ending in half a word reads as broken and the fragment carries no meaning anyway, so the last partial word is dropped rather than truncated.
Because nothing was left after removing everything that cannot appear in a slug — text made entirely of punctuation, or of a script this does not transliterate. An empty slug is the honest answer; inventing one would give you a URL that means nothing.
A readable slug helps a person decide whether to click a result, which matters more than any direct ranking effect. Keep it short, keep the meaningful words, and do not stuff it with keywords. Above all, do not change a slug that is already published without redirecting the old one — see the HTTP status codes page for which redirect to use.
Swap 2 and 3 and you leave a trailing hyphen whenever the text ends in punctuation: "Hello, world!" becomes hello-world-. It is the classic off-by-one of this function.
It cuts at a separator, never mid-word. A slug ending in half a word reads as broken, and the fragment carries no meaning anyway.
Runs entirely in your browser. Transliteration is a choice rather than a default you cannot see — every substitution is listed, because ñ becoming n matters more in a personal name than in a headline. Nothing you type here is sent to our servers — the calculation runs entirely in your browser.