Skip to main content
ToolMaple

Slug Generator (URL Slug)

Make clean, lowercase URL slugs from any title.

Last updated:

Separator

a, an, the, and, of, to, in, is and similar

Cut at a whole word. Leave empty for no limit.

Slugs

3 slugs ready

  1. 10-tips-for-better-sleep-and-less-stress

    40 characters

  2. creme-brulee-the-easy-way

    25 characters

  3. why-sao-paulos-street-food-is-worth-the-trip

    44 characters

What a slug is, and the five steps this one takes

The slug is the readable end of a web address, the creme-brulee-the-easy-way in example.com/blog/creme-brulee-the-easy-way. It has one technical requirement: it should only use characters that a URL can carry without encoding. The URL standard, RFC 3986, calls letters, digits, the hyphen, the full stop, the underscore and the tilde unreserved, and anything outside that set turns into percent-encoded codes such as %C3%A9 somewhere along the way. So the slugs here use only a to z, 0 to 9 and one separator.

Getting there from a real title takes five steps, in this order:

  1. Unicode normalization (NFKD) splits every accented letter into a base letter and its accent, and turns full width letters, ligature characters that pack fi or fl into one symbol, and circled or superscript digits into their plain forms. The accents are then dropped, so Crème Brûlée becomes Creme Brulee.
  2. Letters that do not split get their usual ASCII spelling: ß to ss, æ to ae, œ to oe, ø to o, ł to l, đ and ð to d, þ to th and the dotless ı to i.
  3. An ampersand becomes and, and apostrophes are deleted rather than turned into a break, so don’t becomes dont instead of don-t.
  4. Everything else becomes a separator: spaces, punctuation, emoji and letters from other writing systems. Runs of them collapse into one, and none is left at either end.
  5. The options apply last: lowercase, the stop word filter, and the length limit, which cuts at the last whole word that fits.

Which settings to pick

  • Hyphenfor web pages. Google’s URL guidance recommends hyphens over underscores between words, at the time of writing, and it is what WordPress, Shopify and most other platforms generate.
  • Underscore when the slug is an identifier rather than an address: a file name, a database key, an analytics label, or a system whose existing names already use underscores.
  • Lowercase on for URLs. The domain part of an address ignores case, but the path after it can be case sensitive, so /About and /about may be two different pages, or one page under two addresses. Turn it off only for wiki style titles and file names where capitals are part of the name.
  • Remove stop words for long titles, where it pushes the words people search for to the front. Leave it off for short titles, where the little words carry the meaning: Out of Office becomes out-office.
  • Max length when a field has a limit or your style guide sets one. Five or six meaningful words is plenty for most pages.

How to write the slug for a new post or product

  1. Paste the title as it will appear on the page. The slug updates as you type.
  2. Read the slug on its own, as if it were the only thing someone saw in a shared link. If it still says what the page is about, it is done.
  3. If it is long, tick Remove stop words, or delete the words that only make sense in a headline from the title box, such as ultimate, simple or a year that will date the page.
  4. Press the copy button next to the slug and paste it into your platform’s slug field before you publish, not after.

How to make slugs for a whole spreadsheet column

  1. Copy the column of titles from Excel, Google Sheets or a CSV file and paste it into the box. Each row becomes one line.
  2. Look for rows marked Duplicate. Two products called Blue Mug and Blue Mug! produce the same slug, and most import tools either reject the second or quietly add a number to it.
  3. Look for rows that say there were no Latin letters or digits to keep. Those titles need a romanized version written by hand.
  4. Press Copy all and paste into the first cell of the slug column. Blank rows stay blank, so every slug lands next to its title.

Getting the slugs into your site

  • One slug: the copy button on its row. Paste with Ctrl+V, Cmd+V on a Mac, or a long press on a phone.
  • Many slugs: Copy all puts them on the clipboard one per line, ready for a spreadsheet column or a text editor.
  • WordPress: the URL, or permalink, field in the post settings sidebar takes just the slug, not the whole address.
  • Shopify: the URL handle, under the search engine listing section of a product, collection or page.
  • Webflow: the Slug field of a CMS item or in the page settings.
  • If the copy fails inside the in-app browsers of Instagram, Facebook or LINE, select the slug and copy it by hand, or open the page in Safari or Chrome.

How popular platforms make slugs, and where they differ

  • WordPress builds the slug from the title when you first save, lowercases it, removes accents and keeps stop words. When the slug is already taken it appends -2, -3 and so on. It also keeps letters from other scripts, percent-encoded behind the scenes, where this page drops them.
  • Django, the Python framework, has a slugify function that converts to ASCII unless told to allow Unicode, lowercases, turns spaces into hyphens and removes other characters, but keeps underscores. A title in snake_case survives there and is split here.
  • Ruby on Rails offers parameterize, which transliterates to ASCII and joins with hyphens by default, with options to change the separator or preserve case.
  • Static site generators such as Hugo and Jekyll derive the slug from the file name or the title, each with its own rules, and let you override it in the front matter.

Language specific spellings

Stripping accents is the same everywhere, but the preferred ASCII spelling is not. German writes ä, ö and ü as ae, oe and ue when accents are unavailable, Danish and Norwegian use aa for å, and some platforms switch to those spellings when the site language is set accordingly. This page applies one rule for every language, so a German slug comes out as muller rather than mueller. If that matters, type the preferred spelling into the title box.

Before you publish

  • A published slug is part of the address. Changing it breaks every existing link and bookmark unless you add a permanent (301) redirect from the old address.
  • Other writing systems are removed, not converted. Cyrillic, Greek, Arabic, Hebrew, Chinese, Japanese and Korean titles leave nothing behind, and the row says so.
  • Stop word removal can change the meaning. The list leaves out how, what, why and not for that reason, but read the result before using it.
  • Dates age a page. A year in the slug is still there after the content is updated, and the address cannot follow it without a redirect.
  • A slug is not a unique ID. Two different titles can produce the same slug; the Duplicate mark catches it inside one batch, not against pages already on your site.

Frequently asked questions

What is a URL slug?

The slug is the part of a web address that names one page, usually after the last slash: in example.com/blog/creme-brulee-the-easy-way the slug is creme-brulee-the-easy-way. Most content management systems build it from the page title the first time you save and let you edit it before publishing. A good slug is short, readable, lowercase and made only of letters, digits and hyphens, so it looks the same everywhere the link appears.

Should I use hyphens or underscores in a URL?

Hyphens, for anything a search engine will see. Google recommends hyphens rather than underscores to separate words in its guidance on URL structure, at the time of writing, and hyphens are what almost every blogging platform produces. Underscores make sense where the slug is really an identifier, such as a file name or a key in a system that already uses them. Both are safe in a URL without any encoding.

Should I remove stop words like the, a and of from my slugs?

It is a matter of taste rather than a rule. Removing them makes slugs shorter and puts the important words first, which is why some SEO plugins have suggested it. Keeping them makes the slug read like the title, and on a short title removing them can change the meaning. This page removes only articles, conjunctions, short prepositions and forms of to be, never how, what, why or not, and it keeps everything when a title is made of nothing but stop words.

How long should a URL slug be?

No limit you are likely to reach applies: browsers and servers accept addresses far longer than any slug you would write. Shorter is easier to read, share and type, though, and the end of a long address is often cut off in search results and link previews. A handful of meaningful words is a common target. Use the Max length box to cap the slug; it cuts at the last whole word that fits, so a slug never ends in half a word.

What happens to accented letters and characters like ß or ø?

Accents are removed, so é becomes e, ñ becomes n and ç becomes c. Unicode normalization (NFKD) splits each letter from its accent and the accent is dropped. Letters that are not a base letter plus an accent get their usual ASCII spelling instead: ß becomes ss, æ becomes ae, ø becomes o, ł becomes l and þ becomes th. German writers often prefer ae, oe and ue for ä, ö and ü, which this page writes as a, o and u, so edit those by hand if your style guide asks for it.

Why is my slug empty?

Because nothing in the title survives as ASCII letters or digits. The generator strips accents but does not transliterate other writing systems, so a title in Russian, Greek, Arabic, Hebrew, Chinese, Japanese or Korean has nothing left to keep, and its row says so. Either write a romanized or English version of the title, or keep the original script: many platforms accept slugs in any language, which browsers display as typed and send percent-encoded. See how a non-Latin slug is percent-encoded

Can I make slugs for a whole list of titles at once?

Yes. Paste the titles one per line, for example a column copied from a spreadsheet, and each line gets its own slug in the same order. Blank lines stay blank, so Copy all pastes back into the same rows. When two titles produce the same slug, both rows are marked Duplicate, because most systems need slugs to be unique and would otherwise add a number to one of them.

Will changing the slug of a published page hurt it?

Changing a slug changes the address, so existing links, bookmarks and search results point at a page that no longer exists unless you redirect them. If you have to change one, set up a permanent (301) redirect from the old address to the new one; most platforms have a setting or a plugin for it, and WordPress redirects some changed post slugs on its own. Choose the slug carefully before publishing and leave it alone afterwards.

Why did the ampersand turn into and?

Because an ampersand has a job in URLs: it separates the parameters after a question mark, so it cannot stay in a slug as it is. Dropping it silently would merge two ideas, turning Salt & Pepper into salt-pepper, so it is written out as and instead. If you would rather lose it, tick Remove stop words, which drops that and along with the other short words.

Is anything I type sent to a server?

No. The slugs are made in your browser as you type, and the titles are never uploaded, written into the address bar or stored between visits. The only thing recorded is an anonymous event when you press a copy button, saying whether it copied one slug or all of them, never the text itself.

Sources

More text tools

To see how a slug that keeps its accents or another script travels through a URL, paste it into the URL encoder. For camelCase, snake_case and other identifier styles that keep accents, use the text case converter. To check a title against a length limit before it becomes a slug, the word counter counts characters and words, and to see what changed between two versions of a list of slugs, the text compare tool marks every difference.

Related tools

Privacy: slugs are made entirely in your browser. The titles you type are never uploaded, never written into the address bar and never stored between visits, so closing the tab clears them. Pressing a copy button records an anonymous analytics event saying only whether one slug or all of them were copied, never the text.