Skip to content
Daily Web Lab

URL Slug Generator

A URL slug generator for titles in any Latin, Cyrillic or Greek alphabet. It reports every character it changed, and flags the letters the slugify code in most tutorials would delete without telling you.

By Umair Nazir · last checked

Slug
Your slug appears here
Options
Umlauts

German convention expands; most tools strip. Libraries disagree.

Barred D

Croatian romanises it as dj; other tables use a plain d.

Separator

Google treats hyphens as word breaks and underscores as joins.

Cuts at a word boundary, never mid-word.

Everything runs in your browser. What you type is never uploaded, logged, or stored.

Why the JavaScript Slugify Function You Copied Loses LettersThe function in every tutorial handles French and deletes Danish. I measured twelve strings, found the cause, and wrote a version that keeps every letter.

How to use the URL Slug Generator

  1. Paste a title

    The slug updates as you type. Try the non-English sample if you want to see the difference the transliteration makes, since that is where tools in this category diverge most.

  2. Read the character report

    Every non-ASCII character you typed is listed with what it became and its Unicode code point. Anything the common NFD approach would have deleted outright is called out separately, with the slug that approach produces.

  3. Pick a convention if it matters

    German umlauts can expand to ae, oe and ue or strip to a, o and u, and the barred d can romanise as d or dj. Maintained libraries disagree on both, so the choice is yours rather than a silent default.

  4. Copy it before publishing, not after

    Set a maximum length if your CMS enforces one; the slug is cut at a word boundary rather than mid-word. Decide the slug before the URL is indexed, because changing it later needs a redirect.

Why most slug tools quietly delete letters

Search for how to build a slug and you get the same twelve lines of JavaScript everywhere. I read ten of the top results on 2026-10-21 and the shape is identical in all of them: normalise the string to NFD, strip the combining accent marks, lowercase it, then remove whatever is left that is not a letter, digit or hyphen.

It looks thorough. It handles French and Spanish perfectly. Several of those pages present it as the fix for accented text, and for the languages they test with, it is.

Then I ran twelve real names through it. Eight came back with letters missing. Not transliterated badly. Gone. Six of the eight are below.

LanguageInputThe usual one-linerThis tool
GermanStraßestraestrasse
DanishSørensrensoren
PolishŁódźodzlodz
CroatianĐakovoakovodakovo
TurkishDiyarbakırdiyarbakrdiyarbakir
IcelandicÞingvelliringvellirthingvellir
Six names put through the slugify function the top-ranking tutorials publish, and through this tool. The middle column is not a typo in the table: those letters are deleted, with no error and no warning. Reproduce it with scripts/measure-slugs.mjs.

The cause is structural, which is why no amount of adding special cases fixes it. NFD splits a letter into a base plus a combining mark, so it only reaches characters that have something to split. The sharp s, slashed o, barred l, barred d, dotless i, thorn, eth and the ae and oe ligatures have no decomposition at all. They sail through the normalise step unchanged, and the catch-all on the next line removes them as punctuation.

A Danish given name becomes nonsense, and nothing in the code reports a problem. That is the failure mode worth knowing about: it is silent, and it surfaces only in the languages least likely to have been tested by whoever wrote the snippet.

The real libraries disagree with each other too

Using a maintained package instead of the snippet avoids the deletions. It does not get you one correct answer, because there is more than one defensible answer and the popular packages have picked different ones. I installed three and measured them on 2026-10-21.

German, “Höhlen über München”

  • slugify → hohlen-uber-munchen
  • @sindresorhus/slugify → hoehlen-ueber-muenchen
  • speakingurl → hoehlen-ueber-muenchen

Icelandic, “Þingvellir og Jökulsárlón”: four implementations, four different results

  • one-liner → ingvellir-og-jokulsarlon
  • slugify → thingvellir-og-jokulsarlon
  • @sindresorhus/slugify → t-hingvellir-og-joekulsarlon
  • speakingurl → thingvellir-og-joekulsarlon
Three maintained npm packages plus the tutorial one-liner, given identical input. Versions: slugify 1.6.9, @sindresorhus/slugify 3.0.1, speakingurl 14.0.1.

German here is a genuine convention split rather than a bug. German expands an umlaut, so Munich is spelled muenchen the way a passport would spell it, and that is what two of the three packages do. The third strips the dots instead. Both choices are defensible; they are not interchangeable, and a slug is permanent once it is indexed.

Icelandic shows something else entirely. Look at the third result: t-hingvellir, with a hyphen wedged inside the first word. I narrowed it down, because a stray separator looked more like a bug than a convention. Capital thorn becomes the two letters Th, and the package then splits camel case into words, so it reads the lowercase h after the capital T as a new word and breaks there. Lowercase thorn is handled correctly. Only the capital misbehaves, which is exactly the sort of thing that survives in a library for years, since it needs an Icelandic title that starts with a capital thorn to notice.

What this tool does with every character

Every URL slug generator has to decide what to do with each character it cannot keep as it is, and almost all of them decide silently. These are the decisions this one makes. I drive every row through the live tool whenever the logic changes, so the table and the behaviour cannot drift apart.

CharacterBecomesWhy
é, à, ñ, å, če, a, n, a, cAccent removed. These decompose, so every tool gets them right.
ßssExpanded. Has no decomposition, so the usual approach deletes it.
ä, ö, üae, oe, ueGerman convention by default, switchable to a, o, u.
ø, ło, lStroke removed by table, never by decomposition.
đdSwitchable to dj, which is the Croatian romanisation.
ıiTurkish dotless i. toLowerCase alone does not reach it.
þ, ðth, dIcelandic thorn and eth.
æ, œae, oeLigatures are expanded, not split or dropped.
Cyrillic, GreekLatinWhole alphabets, including their capitals and accented vowels.
&, @, %and, at, percentExpanded into words when that option is on.
Other scriptsremovedReported in the panel rather than dropped in silence.
The transliteration table in full. Anything outside it is reported in the result panel rather than removed silently.

One limit worth being straight about. Chinese, Japanese, Arabic, Hebrew and the Indic scripts have no single agreed Latin form, and picking one would mean picking a romanisation system on your behalf. The tool removes those characters and names them in the panel, so you can transliterate them yourself and paste the result back.

Hyphens, length and the parts that actually matter

Getting every character right is what a URL slug generator is for. Choosing the shape of the URL is still your call, and two of those choices matter more than the rest.

Use hyphens. Google has said for many years that it reads a hyphen as a word break and an underscore as a join, which makes image-compressor two words while image_compressor reads as a single strange one. The underscore option exists because some systems require it, not because it is a reasonable default.

Keep slugs short enough to read in a search result, and resist trimming them to the character. Stop-word removal is off by default here for the same reason: dropping every small word turns a title into a telegram, and the gain is theoretical.

Changing a slug that is already indexed is the decision that costs real traffic. Do not do it unless you are willing to set up a redirect, because the old URL is what every existing link still points at. Slugs are cheap to get right once and expensive to revise.

Frequently asked questions

What is a URL slug?

The readable part of a URL that identifies one page, usually the last segment. In https://dailyweblab.com/tools/url-slug-generator the slug is url-slug-generator. It is normally lowercase, uses hyphens between words, and contains only characters that survive a URL without being percent-encoded into something unreadable.

Why do slug generators give different results for the same title?

Because transliteration has more than one correct answer and each tool has picked one. Measured on 2026-10-21, the German phrase Hoehlen ueber Muenchen comes out as hohlen-uber-munchen from the slugify package and hoehlen-ueber-muenchen from both @sindresorhus/slugify and speakingurl. German convention expands an umlaut, which is why passports spell Munich muenchen, so the second form is the more faithful one. Neither is a bug. They are different conventions, and this tool lets you choose instead of deciding for you.

Why does my slug lose accented characters entirely?

Almost certainly because the code is normalising to NFD and then stripping anything that is not a letter, digit or hyphen. That works only for characters that decompose into a base letter plus an accent. The German sharp s, Danish slashed o, Polish barred l, Croatian barred d, Turkish dotless i, Icelandic thorn and eth, and the ae and oe ligatures have no decomposition, so they survive the normalise step and are then deleted as punctuation. Measured across twelve test strings, eight lost at least one letter this way.

Should a URL slug use hyphens or underscores?

Hyphens. Google has stated for years that it treats a hyphen as a word separator and an underscore as a word joiner, so image-compressor reads as two words while image_compressor reads as one. This tool offers underscores because some content systems and file conventions require them, not because they are a sensible default for a web URL.

How long should a URL slug be?

Short enough to read in a search result, which in practice means a handful of words rather than the whole title. There is no penalty attached to a specific character count, so treat length as a readability question rather than a ranking one. Setting a maximum here cuts at a word boundary so you never end up with a slug that stops mid-word.

Should I remove stop words from my slug?

Usually not, which is why it is off by default. Stripping every a, the, for and of shortens the URL but can make it read strangely, and Google handles either form fine. The option is here for cases where a template builds very long slugs from long titles.

Can I use non-English characters in a URL directly?

Technically yes, through percent-encoding or an internationalised domain, and modern browsers display them readably. In practice the encoded form is what gets copied, pasted and shared, and a Cyrillic slug can expand into a long unreadable string of percent signs. Transliterating to Latin keeps the URL legible everywhere it travels, which is why slug generators exist at all.

Does changing a slug hurt SEO?

Changing one on a page that is already indexed does, unless you redirect the old URL to the new one. Every existing link, bookmark and search result still points at the old address, and without a redirect those arrive at a 404 and the accumulated signals are lost. Getting the slug right before publishing costs nothing; revising it afterwards costs a redirect you have to maintain.

Is what I type uploaded anywhere?

No. The transliteration runs entirely in your own browser, and there is no network request carrying your text. Nothing is logged or stored, and closing the tab discards it. You can confirm that by watching your browser's network tab while you type.

The tools here run entirely in your browser and need no cookies. We would like to use cookies only for advertising and traffic measurement, which help keep the site free. Read our privacy policy.