Turn a title into a URL slug

Type or paste a title and get a clean slug as you type, ready for a blog post, a product page or a file name. Accented and Turkish letters become plain ones, so Çiçek Şöleni turns into cicek-soleni. Paste a list to get one slug per line.

Separator
In characters. Whole words are kept.
0 slugs · 0 characters
Options

What a URL slug is

The slug is the readable part of a URL that names one page: in tools.halit.org/slug-generator/, it is slug-generator. Content systems usually build it from the page title, which is what this tool does, and a good slug stays short and says what the page is about.

Google's URL guidelines recommend simple, descriptive words and hyphens between them rather than underscores, because underscores join words, as in a function name like format_date, while hyphens mark where one word ends. Hyphen is the default here for that reason.

How the title becomes a slug

First each letter loses its accent: é becomes e, ñ becomes n and ş becomes s. Letters that Unicode does not build from a base letter plus an accent get a fixed replacement: ı and İ become i, ß becomes ss, æ becomes ae, ø becomes o and ł becomes l. The accents are removed with Unicode normalization, which also turns ligatures like fi into fi.

Then the text is lowercased, apostrophes are removed so don't becomes dont, and everything that is not a letter or a digit becomes a word break. The words are joined with the separator, so repeated spaces, dashes and punctuation never leave a double hyphen or a hyphen at either end.

With a maximum length the slug keeps as many whole words as fit, so it never ends in half a word. Only a first word longer than the limit is cut.

Stop words, accents and other scripts

Removing stop words makes long slugs shorter: The Art of the Deal becomes art-deal. It is off by default because it can change the meaning, and a title made only of stop words keeps them all. The list is English.

The characters a URL carries without encoding or special meaning are the unreserved ones: letters A to Z, digits, hyphen, dot, underscore and tilde. Google's guidelines still suggest words in the reader's language, like gemüse, percent-encoded in links as gem%C3%BCse; browsers show them as letters. Turn on Keep accented letters for that. Letters from scripts without a Latin equivalent here, such as Cyrillic, Greek, Arabic or Chinese, are kept as they are unless Only a to z and 0 to 9 is on.

In WordPress the slug is the post's URL name, used when the permalink structure includes %postname%. Paste a slug from here into the URL field of the post settings; if it is left empty, WordPress makes one from the title.

Questions

How do I make a URL slug from a title?

Type or paste the title into the first box. The slug appears in the second box as you type; Copy slug puts it on your clipboard. For several pages, paste one title per line and you get one slug per line.

Should a slug use hyphens or underscores?

Hyphens. Google recommends hyphens between words in URLs and advises against underscores, which read as part of one word. Use underscores or dots only where a system needs them, for example in some file or variable names.

How long should a URL slug be?

There is no fixed limit, but shorter slugs are easier to read and share. Three to five words that name the topic usually do it. Set a maximum length here and the slug keeps the whole words that fit.

How are Turkish letters handled?

ç, ğ, ı, ö, ş and ü become c, g, i, o, s and u, and İ becomes i, so İstanbul'da Işık becomes istanbulda-isik. Turn on Keep accented letters to keep them in the slug instead. To convert Turkish or accented letters in ordinary text without making a slug, use Remove special characters.

Should I remove stop words from slugs?

Only when the slug is long and the meaning survives. how-to-write-a-good-slug becomes how-write-good-slug and still reads fine, but taking the words out of a title like To Be or Not to Be leaves only not. The option is off by default.

Is the text I paste uploaded or saved?

No. The slugs are made in JavaScript inside this tab, and the page never sends or stores your text. It only remembers the separator, the length and the options, in this browser. Page views are counted with Cloudflare Web Analytics, which never sees what you type.