Nimble Toolbox

URL slug generator

Paste a title and the slug appears as you type. Paste a list, one title per line, and you get one slug for each.

How to use it#

  1. Paste a title into the box above, or several with one on each line.
  2. Choose hyphens or underscores between the words, and a maximum length if your site has one.
  3. Tick remove stop words for a shorter slug, or keep accents and other alphabets for a title that is not in English.
  4. Copy the slugs from beside the result box.

What a good slug looks like#

A slug is the part of a URL that names the page, such as crop-an-image in example.com/blog/crop-an-image. It is lowercase, uses hyphens between words, and holds nothing a browser would have to percent-encode. A reader who sees it in a search result or a pasted link can tell what the page is about before opening it.

Hyphens are the default here because search engines read a hyphen as a space between words. An underscore joins them instead, so crop_an_image can be read as one long word. Underscores are fine for file names and for systems that require them, but for a page you want found, use hyphens.

What happens to accents, apostrophes, and symbols#

Accents are taken off the letter rather than the letter being dropped, so Crème brûlée becomes creme-brulee. Letters that are not an accented form of another letter are spelled out: "ß" becomes "ss", "æ" becomes "ae", and "ø" becomes "o", which is how a German or Danish writer would type them without the key.

Apostrophes disappear without leaving a gap, so "don't" becomes "dont" rather than "don-t". Every other symbol, from an ampersand to an emoji, counts as a break between words. A run of them becomes a single hyphen or underscore, and none is left at either end.

How long a slug should be#

A short slug is easier to read and to remember, and search engines show only so much of a URL in a result. A common rule of thumb is to stay under 60 characters and to keep the words that say what the page is about. The result panel shows the longest slug you have, so you can check a whole list against your limit at once.

Set a maximum length and each slug is cut at the last whole word that fits, so a slug never ends halfway through a word. Removing stop words is the gentler way to shorten one: "the best way to crop an image" becomes best-way-crop-image, which keeps every word that carries meaning.

Changing a slug after a page is published#

A slug is part of the page address, so changing it changes the address. Links people have shared, bookmarks, and search results all point at the old one, and they break unless the old address redirects to the new one.

Pick the slug when the page is written and leave it alone after that. If a published slug really has to change, set up a permanent redirect from the old address before you switch.

Frequently asked questions#

Should I use hyphens or underscores?

#

Hyphens, for anything you want found in search. Search engines treat a hyphen as a space and an underscore as part of the word, so crop_an_image can read as one word. Underscores suit file names and systems that insist on them.

Which words does remove stop words take out?

#

A short list of English words that add nothing to a URL: "a", "an", "the", "and", "or", "of", "to", "in", "on", "at", "by", "for", "with", "from", "into", "is", "are", "was", "be", and "as". Words such as "how", "why", and "not" stay, because they change what a title means. A title made of nothing but stop words keeps them all rather than coming out empty.

Should a slug keep accents and non-Latin letters?

#

It can. Browsers show them as typed, and search engines read them. They are percent-encoded when the link is copied, though, so a Russian slug pasted into an email becomes a long run of codes. By default they are reduced to a to z. Tick keep accents and other alphabets to keep them. A title in an alphabet with no a to z form, such as Greek or Japanese, needs that box ticked or nothing is left of it, and the result panel says when that has happened.

Can I make slugs for a whole list of titles?

#

Yes. Paste one title per line and each line gets its own slug, in the same order. Blank lines are skipped, so the result lines up with the titles you pasted, minus the gaps.

Is the title I paste sent anywhere?

#

No. The slug is made in this browser tab as you type, so a headline you have not published yet is seen by nobody else.