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
- Enter your page title or phrase in the Text to Slugify box. A counter shows its length in characters.
- 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.
- Read the four results under Generated Slugs. They update as you type, and Generate Slugs refreshes them. Each result shows its own character count.
- Press Copy beside the slug you want and paste it into your CMS, code or URL field.
The four slug formats
| Format | What it does |
|---|---|
| URL Slug | Uses every option you set. This is the one to use for most pages. |
| File Name Safe | Also strips dots. Dots are already removed in the first step, so in practice it matches the URL slug. |
| WordPress Style | Always lowercase with hyphens, and capped at 200 characters when Max Length is 0. |
| GitHub Style | Always 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_slugfor "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.