slug generator
Accents fold to their base letter instead of vanishing.
The short answer
A slug is the readable part of a URL: lowercase, hyphen-separated, nothing in it that needs escaping. Accents fold to their base letter rather than disappearing, so "Crème Brûlée" becomes creme-brulee and not something unreadable.
A slug is the readable part of a URL. This makes one from a title: lowercase, hyphenated, and with nothing in it that a browser would need to escape.
The formula
fold accents → lowercase → anything not a letter or digit becomes a hyphen
Worked examples
- "Hello World"
- hello-world
- "It's a Test"
- its-a-test
- "Top 10: Café Guide"
- top-10-cafe-guide
Reference table
| Title | Slug | The rule |
|---|---|---|
| Crème Brûlée | creme-brulee | Accents fold to base letters |
| It's a Test | its-a-test | Apostrophes vanish, not hyphenate |
| A double space | a-double-space | Runs collapse to one hyphen |
| --Trim me-- | trim-me | Leading and trailing hyphens go |
How to use it
- 01Paste the titlePunctuation, accents and capitals are all fine; they get handled.
- 02Copy the slugReady for a URL, a filename or a CSS class.
Also searched for
Searches that land here include slug generator, url slug, permalink generator, title to slug and seo slug.
What makes a good slug
Readable first, short second
A URL is read by people more often than anyone expects: in search results, in messages, read out over a phone. A slug that describes the page in words a person would use is worth more than one shortened to fit. Two or three words is usually enough, and matching the words in the heading is a reasonable default.
The characters that cause trouble
Spaces have to be escaped, so they become hyphens. Underscores work but are harder to see in an underlined link. Uppercase letters are legal but invite a mismatch, because paths are case-sensitive on most servers and not on others. Anything else — punctuation, symbols, quotes — either needs escaping or means something to a URL parser, so it goes.
Hyphens rather than underscores
Both work. Hyphens are the convention, they survive being underlined, and they are what most publishing systems produce by default, which means fewer surprises when one system hands a URL to another.
Questions people ask
Why turn é into e rather than dropping it?
Because dropping it destroys the word. Crème becomes crme, which nobody can read and no search engine can match to anything. Folding to the base letter keeps the word recognisable, which is the entire job of a slug.
Should I strip out the, a and of?
Usually not. The saving is a few characters and the cost is readability, which is what a slug is for. There is no evidence a search engine rewards the shorter version, and a slug that reads oddly is one people mistype when they retype it.
Can I change a slug after publishing?
You can, but the old URL has to redirect permanently to the new one or you lose every link and every ranking pointing at it. That is the reason to spend a minute on the slug now: it is the one part of a page that is expensive to change later.