How to use the slug generator (url slugify)
- Type or paste your titles into the text box, one title per line. Each line becomes one slug on the matching line of the result.
- Pick the separator, hyphen or underscore, and set a maximum length if you need one. Leave it at 0 for no limit.
- Choose whether to keep numbers, keep letters from other scripts, and remove stop words. The stop word list is visible and editable.
- Press Copy slugs. The result copies as plain lines with nothing added.
Worked example
The title Crème Brûlée -- The Best! becomes creme-brulee-the-best. The accents are removed, the letters are lowercased, and the dashes and spaces collapse into single hyphens.
With stop words removed using the list a, an, the, of, the title The Art of a Deal becomes art-deal. With a maximum length of 15, the title the quick brown fox jumps becomes the-quick-brown, because adding the next word would pass 15 characters.
How the slug is built
The tool lowercases the text, removes apostrophes inside words so "don't" becomes "dont", and splits accented letters into a base letter and a separate accent mark (Unicode NFKD normalization), then drops the marks. A short fixed list of letters that do not split that way, such as ß, æ, œ, ø, đ, ð, þ, ł, ħ and dotless ı, is spelled out as ss, ae, oe, o, d, d, th, l, h and i.
Every run of other characters becomes a single separator, and separators at the start and end are trimmed. Existing hyphens and underscores count as separators too, so switching to underscores also converts hyphens.
Limits you should know
This is not a translation. Letters from scripts with no Latin form, such as Chinese, Japanese, Arabic, Hindi or Cyrillic, are dropped, so a title written only in those scripts gives an empty slug. Turn on keep letters from other scripts to keep them as lowercase Unicode letters. Those slugs are valid in modern addresses but are shown percent encoded in many places, and you can check how with the URL encoder and decoder.
The maximum length cuts at a separator, so a word is never chopped in the middle. The only exception is a first word that is longer than the limit by itself, which is shortened to fit. A limit is counted in characters, not bytes.
Stop words and good slugs
Dropping small words such as a, the and of makes slugs shorter, but short is not automatically better, and the list is a starting example, not a standard. Edit it to suit your site. If every word on a line is a stop word, the words are kept so you never get an empty slug. Whatever you pick, keep slugs stable once a page is published, because changing one changes the address. To adjust capitalization of the original title first, use the case converter. Everything runs in your browser and nothing is uploaded.
Assumptions and limits
- Output uses only lowercase letters, numbers and the chosen separator, unless you keep Unicode letters.
- Non-Latin scripts are dropped by default. The tool does not translate or romanize them.
- Stop words come from the visible list, which is an editable example and not a standard.
- Input is limited to 200,000 characters, and empty lines stay empty so the output lines match the input lines.
Frequently asked questions
Why did my slug come out empty?
Every character on that line was removed. This happens with text in a script that has no Latin form, such as Chinese, or with only punctuation. Turn on keep letters from other scripts to keep non-Latin letters.
Does the maximum length cut a word in half?
No. The slug stops before the first word that would pass the limit. Only a first word that is longer than the limit on its own is shortened.
Should I use hyphens or underscores in a slug?
Hyphens read as word breaks to people, while underscores suit file names and identifiers. Both work in addresses and the tool supports both, so the choice is yours to make.
What happens to numbers and apostrophes?
Numbers are kept unless you turn that option off, in which case they act as separators. Apostrophes inside words are removed, so it's becomes its rather than it-s.