Text & Writing

URL Slug Generator

URL slug generator that turns titles into clean, lowercase, hyphenated slugs as you type, one at a time or a whole list in bulk.

Input Text
0 characters
Options
Generated Slugs
Bulk Mode

Paste multiple lines to generate a slug for each line (uses URL Slug format).

0 lines
0 lines

This slug generator turns a title, heading or phrase into a URL slug, the readable part of an address that names one page, such as my-blog-post-title. It shows four versions at once: a standard URL slug, a file-name-safe version, a WordPress-style slug and a GitHub-style heading anchor. It runs in your browser, so you can slugify online without installing a library.

How to use the slug generator

  1. Enter your page title or phrase in the Text to Slugify box. A counter shows its length in characters.
  2. Set the options: Separator (a hyphen or the _ character), Max Length (0 means no limit), Force lowercase and Transliterate accented characters. Both checkboxes are ticked by default.
  3. Read the four results under Generated Slugs. They update as you type, and Generate Slugs refreshes them. Each result shows its own character count.
  4. Press Copy beside the slug you want and paste it into your CMS, code or URL field.

The four slug formats

FormatWhat it does
URL SlugUses every option you set. This is the one to use for most pages.
File Name SafeAlso strips dots. Dots are already removed in the first step, so in practice it matches the URL slug.
WordPress StyleAlways lowercase with hyphens, and capped at 200 characters when Max Length is 0.
GitHub StyleAlways lowercase with hyphens, for linking to a heading. It ignores the Separator and Max Length options.

URL slug examples

With the default options, the generator removes anything other than letters, digits, spaces, hyphens and underscores, joins the words with one hyphen and lowercases the result:

10 Tips for Writing Better Headlines (2026 Edition)!  -> 10-tips-for-writing-better-headlines-2026-edition
Crème Brûlée: 10 Tips!                                -> creme-brulee-10-tips
What's New in v2.5?                                   -> whats-new-in-v25
A - B Testing_Guide                                   -> a-b-testing-guide

Watch for version numbers and decimals: the dot is removed, so v2.5 becomes v25. Type "v2-5" in the title first if you want the digits kept apart.

What the options change

  • Choosing _ as the separator gives how_to_write_a_url_slug for "How to Write a URL Slug". The WordPress and GitHub results keep hyphens.
  • Max Length cuts at exactly that many characters, even mid-word, and then drops a trailing hyphen. With 20, "How to Write a URL Slug That Works" becomes how-to-write-a-url-s, so shorten the title by hand if the cut lands badly.
  • Unticking Force lowercase keeps your capitals: How-to-Write-a-URL-Slug.
  • Unticking Transliterate accented characters drops accented letters instead of converting them, so "Crème Brûlée" becomes crme-brle.

Slugify URL lists in Bulk Mode

Bulk Mode, further down the page, takes one title per line and returns one slug per line in the URL Slug format, using the same separator, length and checkbox settings. Paste the list, press Generate Bulk Slugs, then Copy All. Blank lines stay blank, so the output lines up with the input when you paste it back into a spreadsheet column.

The GitHub Style result is the anchor GitHub gives a heading in a README. A heading called "Install and Setup" becomes install-and-setup, so a link written as [Setup](#install-and-setup) jumps straight to it.

What makes a good URL slug

The slug is only the last part of an address. In /blog/what-is-json-explained, the slug is what-is-json-explained and /blog/ is the section it sits in, so you don't need to repeat the section name in the slug. A URL slug generator like this one handles the formatting; choosing the words is up to you.

Google's URL structure guidelines recommend readable words rather than long ID numbers, and hyphens rather than underscores between words. A clear slug also tells people where a link leads before they click it. Keep it short and close to the page's main topic, the way the guide on writing title tags suggests for titles.

Changing a slug on a published page changes its address. Set up a 301 redirect from the old URL and test it with the redirect checker, and see the article on canonical tags for when two addresses show the same content. If a slug still needs characters a URL can't hold, such as a query string, the URL encoder percent-encodes them. More text tools are in the writing tools category.

Frequently Asked Questions

What makes a good URL slug?
Short, lowercase and readable, with hyphens between words and the words a searcher would recognise. Google recommends hyphens over underscores and readable words over long ID numbers. Many people also drop filler words such as 'and' or 'the' to keep the slug short.
Does the slug generator remove special characters?
Yes. Anything other than the letters a to z, digits, spaces, hyphens and underscores is removed, so characters such as &, !, : and # disappear. With Transliterate accented characters ticked, letters such as é and ü are converted first, to e and ue. With it unticked, accented letters are dropped along with the symbols.
Should I include stop words in my slug?
It is a style choice. Google's URL guidelines ask for readable words and do not mention stop words. Dropping 'a', 'the' and 'of' keeps a slug shorter, but keep them when the slug reads oddly without them. The tool does not remove stop words, so delete them from the title first if you want them gone.
Can I generate slugs for non-English titles?
Only for languages written in Latin letters, and with gaps. With Transliterate accented characters ticked, é, ñ, ç and ł become e, n, c and l, and German ä, ö, ü and ß become ae, oe, ue and ss. The table has no entry for à, á, â or ã, so those letters are dropped and São Paulo becomes so-paulo. Cyrillic, Arabic, Chinese and other scripts are removed entirely, so write such titles in Latin letters before pasting them.
How do I slugify a string in JavaScript or Python?
The rules this page uses fit in a few lines of code: lowercase the text, remove everything except letters, digits, spaces, hyphens and underscores, replace runs of spaces, hyphens and underscores with one hyphen, and trim hyphens from both ends. Libraries such as slugify on npm and python-slugify also convert accents for you.