Text

URL Slug Generator

Paste a title and get the URL-safe version. Put one title per line and you get one slug per line, which is the fastest way to plan a batch of posts. Accented Latin letters are folded to their plain equivalents; the tool tells you when something could not be folded.

Search engines treat a hyphen as a word break. An underscore joins the words instead.

Cut on a word boundary, never mid-word.

What a slug is, and where the name comes from

The slug is the readable last part of a URL — the url-slug-generator in this page's address. The word is borrowed from newspapers, where a slug was the short working name a story was filed under before anyone wrote the headline.

It has two jobs. It tells a person what they are about to click before they click it, which matters because URLs get pasted into messages with no other context. And it gives a search engine a few more words of plain description, in a place that is hard to stuff with keywords without looking ridiculous.

Why the obvious one-liner is wrong

Almost everyone writes the same first attempt: lowercase the string, replace spaces with hyphens. It fails on the first real title you feed it.

The accent problem, precisely

Unicode can spell "é" two ways: as the single character U+00E9, or as a plain "e" followed by the combining acute accent U+0301. Both look identical on screen and neither is more correct. The trick every slug library uses is to force the second form and then throw the accent away: normalize the string to NFD, which decomposes precomposed letters into base plus marks, then delete everything in the combining range U+0300 to U+036F. That single step handles é, ñ, ü, å, ç and most of Western Europe.

It does nothing for ß, ø, đ, ł, þ, æ or œ, and this is the part that surprises people. Those are not accented letters — they are separate letters in their own alphabets, with no base character hiding inside them. NFD leaves them untouched, the ASCII filter then deletes them, and "Straße" quietly becomes "strae". The only fix is a lookup table, which is why this tool carries a small one: ß to ss, ø to o, æ to ae, and so on.

Scripts that cannot be folded at all

A URL is allowed to contain non-ASCII characters — browsers encode them as UTF-8 bytes in percent notation. The address bar hides that, so a Cyrillic or Greek slug looks perfectly clean while you are looking at it. Copy it into an email, a chat message or a spreadsheet and it becomes something like %D0%BF%D1%80%D0%B8: six characters of noise per letter, because each of those letters is two bytes and each byte costs three characters to encode.

So you have a real choice, not a technical one. Keep the native script and accept ugly encoded links when they travel, or transliterate to Latin and accept an approximation. This tool does not transliterate Cyrillic, Greek, Arabic, Hebrew or CJK — those need per-language tables, and the right mapping for the same letter differs between Russian and Ukrainian. It removes them and tells you how many it removed, rather than pretending.

Rules worth keeping

Where this tool stops

It cannot know what already exists on your site, so it will happily generate the same slug twice for two similar titles. Adding -2 is your CMS's job, or yours. It does not know your platform's reserved paths either — a slug of "admin", "api" or "feed" can collide with something your framework already owns.

Dropping stop words shortens URLs nicely and occasionally destroys the meaning. "The Who" becomes "who", "To Be Or Not To Be" becomes "be-not-be". Leave the option off for titles that lean on small words, and read the result before you publish it.

Frequently asked questions

Should a URL slug use hyphens or underscores?

Hyphens. Google has long stated that it treats hyphens as word separators and underscores as joiners, so an underscored slug can be read as a single token. Hyphens are also the convention almost every CMS defaults to.

How long should a slug be?

Long enough to describe the page, short enough to read in a search result. Three to six words is a comfortable range. There is no ranking penalty for a long URL, but truncation in search results and messaging apps makes long ones less clickable.

What happens to accented characters?

They are folded to their plain Latin equivalents: é becomes e, ñ becomes n, ü becomes u. Letters that are not accented versions of anything get a lookup instead — ß becomes ss, ø becomes o, æ becomes ae.

Can I use Cyrillic, Greek or Chinese in a slug?

Technically yes, since browsers percent-encode them. In practice the encoded form leaks out whenever the link is copied into plain text, turning each letter into six characters of noise. This tool removes those characters and reports how many, rather than guessing at a transliteration.

Is it safe to change the slug of a published page?

Only with a 301 redirect from the old path to the new one. Without it, every existing link, bookmark and search result points at a 404 and the accumulated ranking signals go with it.

Last updated September 19, 2026