URL Slug Generator
Type or paste titles, one per line, and each becomes a URL slug: lowercase words joined by hyphens, accents turned into plain letters. For example “Crème Brûlée: A Beginner’s Guide” becomes creme-brulee-a-beginners-guide, and “Straße & Ølbryggeri — Visit Us!” becomes strasse-olbryggeri-visit-us. Choose a hyphen or an underscore, keep or drop capitals, convert accents (ß becomes ss, ø becomes o), keep or drop non-Latin scripts, remove stop words and cap the length at a whole word. A batch of titles is checked for duplicate slugs, with a -2, -3 suffix suggested. Everything runs in your browser; your titles are never uploaded.
Updated Runs in your browser: nothing you enter is uploadedHow this tool works
Replace the example: type one title, or paste a whole list. The slugs update as you type.
Your titles are processed on this device and never uploaded. They are not saved either: reload the page and they are gone.
Slugs
5 titles turned into slugs; 1 repeats an earlier slug.
1 slug is used by more than one title. Two pages cannot share a URL, so give the later ones a suffix:
how-to-make-pizza-at-homeLines 3 and 4. Suggested: line 4 → how-to-make-pizza-at-home-2
Non-Latin letters stay readable here, but in a real URL they are percent-encoded (UTF-8), soпривет-мирis sent as%D0%BF%D1%80%D0%B8%D0%B2%D0%B5%D1%82-%D0%BC%D0%B8%D1%80. Turn off “Keep non-Latin scripts” for ASCII only.
Counts
- Titles
- 5
- Slugs
- 5
- Duplicate slugs
- 1
- Longest (characters)
- 30
What each option does
| Option | Slug | Effect |
|---|---|---|
| Default | the-cafes-best-strasse-olbryggeri-привет-2-0 | Hyphens, lowercase, accents to ASCII, other scripts kept, ends trimmed, repeats collapsed. |
| Underscore separator | the_cafes_best_strasse_olbryggeri_привет_2_0 | Words are joined with “_”. Google recommends hyphens for words in URLs. |
| Keep capitals | The-Cafes-Best-Strasse-Olbryggeri-Привет-2-0 | Letter case is kept. URL paths are case-sensitive, so a mixed-case slug can create a second URL for the same page. |
| Keep accents | the-cafés-best-straße-ølbryggeri-привет-2-0 | ç, é, ß and ø stay as Unicode letters, which a URL must percent-encode. |
| Drop non-Latin scripts | the-cafes-best-strasse-olbryggeri-2-0 | Cyrillic, Hebrew, Greek, Arabic, CJK and other scripts are removed and act as a gap. |
| Remove stop words | cafes-best-strasse-olbryggeri-привет-2-0 | Common English words such as “the” and “of” are removed. |
| Max length 20 | the-cafes-best | Whole words only: the last word that would pass 20 characters is left out. |
| Do not collapse | the-cafes--best--strasse----olbryggeri---привет-2-0 | Every gap character becomes a separator, so “ -- ” gives three. |
| Do not trim | -the-cafes-best-strasse-olbryggeri-привет-2-0- | A gap at the start or end of the title leaves a separator there. |
Which characters a slug keeps
| Character | Example title | Slug | What happens |
|---|---|---|---|
| Letters A–Z, a–z | Ab | ab | Unreserved (ALPHA): kept, lowercased by default. |
| Digits 0–9 | 42 | 42 | Unreserved (DIGIT): kept. |
| Hyphen - | a-b | a-b | Unreserved: the word separator. |
| Underscore _ | a_b | a-b | Unreserved: a gap, joined with your separator. |
| Period . | a.b | a-b | Unreserved but treated as a gap, so “v2.0” becomes “v2-0”. |
| Tilde ~ | a~b | a-b | Unreserved but treated as a gap. |
| Space | a b | a-b | Not allowed in a URL (it would become %20): a gap. |
| Reserved: / ? # & = : @ | a/b?c&d | a-b-c-d | These have a job in a URL, so they are gaps. |
| Apostrophe in a word | don’t | dont | Dropped without a gap. |
| Accented letter é | é | e | Not unreserved: converted to e. |
| Other script (Ж) | Ж | ж | Not unreserved: kept as a Unicode letter, which percent-encodes to %D0%96. |
Accent and special-letter conversion
| Letters | Becomes | How |
|---|---|---|
| é à ü ñ ç å | e a u n c a | NFKD splits off the accent, which is then removed |
| ß | ss | Mapped by hand: NFKD leaves it whole |
| æ | ae | Mapped by hand: NFKD leaves it whole |
| ø | o | Mapped by hand: NFKD leaves it whole |
| œ | oe | Mapped by hand: NFKD leaves it whole |
| đ | d | Mapped by hand: NFKD leaves it whole |
| ł | l | Mapped by hand: NFKD leaves it whole |
| þ | th | Mapped by hand: NFKD leaves it whole |
| Ж й ש | Ж й ש | Not Latin: left exactly as typed (NFKD would turn й into и) |
Stop words removed
| Words |
|---|
| a, about, an, and, are, as, at, be, been, but, by, for, from, if, in, into, is, it, its, of, on, or, so, than, that, the, then, these, this, those, to, was, were, with |
How to turn a title into a URL slug
- Enter your titles. Replace the example with one title, or many titles one per line. The slugs appear beside them as you type.
- Pick the separator and case. Hyphens are the usual choice for URLs; underscores are available. Lowercase is on by default because URL paths are case-sensitive.
- Decide about accents and other scripts. Leave “Convert accented letters” on for plain ASCII, or turn it off to keep letters like é. Keep or drop Hebrew, Cyrillic, Chinese and other scripts.
- Shorten if needed. Remove stop words and set a maximum length; the slug is cut between words, never in the middle of one.
- Check duplicates and copy. If two titles give the same slug a warning lists them with suggested -2, -3 suffixes. Copy the slugs, one per line.
Frequently asked questions
- What is a URL slug?
- The last part of a page address that names the page, such as “creme-brulee-a-beginners-guide” in example.com/recipes/creme-brulee-a-beginners-guide. It is usually made from the page title, and it should be short, readable and stable.
- Should a slug use hyphens or underscores?
- Hyphens. Google’s URL structure guidance recommends separating words with hyphens (-) rather than underscores (_), because hyphens are read as word separators. Both are “unreserved” characters under RFC 3986, so either is valid in a URL.
- Why lowercase?
- Under RFC 3986 only the scheme and host are case-insensitive; the path is case-sensitive, so /Pizza and /pizza can be two different URLs. Writing every slug in lowercase avoids duplicates and broken links from a mistyped capital.
- Which characters are safe in a slug?
- The RFC 3986 unreserved characters: the letters A to Z and a to z, the digits 0 to 9, and the four marks - . _ ~. Anything else, including spaces and the reserved characters / ? # & =, must be percent-encoded, which makes the URL long and unreadable. This tool keeps letters, digits and your separator, and treats everything else as a gap.
- How are accents and letters like ß or ø handled?
- With “Convert accented letters” on, é becomes e and ñ becomes n by Unicode decomposition (NFKD) and removing the combining accent marks. A few letters have no decomposition, so they are mapped by hand: ß to ss, æ to ae, ø to o, œ to oe, đ to d, ł to l, þ to th. Letters of other scripts are not touched.
- Can a slug contain Hebrew, Cyrillic or Chinese letters?
- Yes. Google’s guidance says a URL may contain Unicode characters as long as they are UTF-8 percent-encoded, and browsers show them as readable letters. The catch is that the URL you copy, paste into a chat or store in a database appears as a long run of %D0%BF-style codes. The tool shows the encoded form of your first non-ASCII slug. Turn on “Drop non-Latin scripts” if you want ASCII only.
- What does the maximum length do?
- It counts characters in the slug (not bytes of its percent-encoded form) and keeps whole words only, so “how-to-make-pizza-at-home” with a limit of 20 gives “how-to-make-pizza-at”, not a word cut in half. If the first word alone is longer than the limit it is cut at the limit, so the slug is never empty because of it.
- Should I remove stop words from slugs?
- It is optional. It makes slugs shorter (“the-art-of-the-deal” becomes “art-deal”) but can also make them less clear, so it is off by default. The tool only removes common English words, and never the words not, no or nor.
- What happens when two titles give the same slug?
- The page shows a warning listing the lines involved and suggests a suffix for each later one: “how-to-make-pizza-at-home-2”, “-3” and so on, using your separator. The suggestions avoid slugs that already exist in your list. The output itself is not changed, so you decide which title keeps the plain slug.
- Can I convert thousands of titles at once?
- Yes. Paste one title per line; a list of 10,000 titles is converted in a fraction of a second and the output has one slug per line, in the same order, with blank lines kept in place.
- Are my titles uploaded?
- No. Everything runs in your browser and the text is never uploaded, stored or logged. If you allow analytics, the site only records that a button was used, never any of your text.
How it works
Each line is a title. It is composed to Unicode NFC, then, if conversion is on, every character of the Latin script (and common symbols) is decomposed with NFKD and its combining marks removed, after the letters ß, æ, ø, œ, đ, ł and þ are mapped by hand. Characters of other scripts are left alone, because NFKD would change some of them (й becomes и). The text is lowercased with the locale-independent Unicode mapping if that is on, and apostrophes between two letters are removed so that “don’t” gives “dont”. The rest is split into words at every run of characters that is not a letter, combining mark or digit, so punctuation, spaces, “.”, “~” and “_” all separate words. Non-Latin letters are kept or dropped by script. Stop words are then removed if asked, unless every word is one. The words are joined with the separator, and the length limit keeps the most whole words that fit. In a batch, a slug that appears on more than one line is reported with 1-based line numbers, and the second, third and later lines are offered the suffixes 2, 3 and so on, skipping any slug already in use.
Sources
More free tools
- Case ConverterConvert text to UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case or CONSTANT_CASE. Stays in your browser.
- URL Encode & DecodePercent-encode or decode URLs and query strings with correct UTF-8, split a URL into parts and parameters, and catch double-encoding. Runs in your browser.
- Word CounterCount words, characters, sentences and reading time, and check your text against X, LinkedIn, Instagram, SMS and meta description limits.
- Remove Duplicate LinesRemove duplicate lines from a list, keep the first or last copy, and sort A to Z, naturally or at random. Works in any language and stays in your browser.
- Text CompareCompare two texts and see what changed, line by line with changed words highlighted. Ignore case or spacing, copy a unified diff. Stays in your browser.
- Lorem Ipsum GeneratorGenerate lorem ipsum by paragraphs, sentences, words or an exact character count, as plain text, HTML or Markdown. Built from the classic Latin passage.