Skip to content
Free, no account, runs in your browser

Slug generator: readable back-halves and random short codes

Two tools in one: a readable slug for a page or a short link's back-half, and random codes for links that should not be guessable. Both run in your browser.

Updated

Readable slug from a title

Options
Type a title.

Random short codes

Characters

How do I turn a title into a URL slug?Paste the title and the generator lowercases it, turns accented letters into plain ones (é becomes e), replaces spaces and punctuation with hyphens, and can drop small stop words such as "the" or "and". Set a maximum length and copy the result. With stop words removed, "The 10 Best Café Menus of 2026!" becomes 10-best-cafe-menus-2026.

How to use it

  1. Pick readable or random

    Readable slug for page addresses and branded back-halves people will see or say. Random code for links that should be short and hard to guess.

  2. For a slug: paste a title

    Choose whether to remove stop words and set a maximum length, then check that the shortened slug still reads well.

  3. For a code: choose the length

    Pick 4 to 12 characters. Turn on avoid look-alikes to leave out 0, O, 1, l and I for codes people will read or type.

  4. Copy and use it

    Check the combinations count, then copy the slug or code into your CMS, link shortener or database.

What makes a good URL slug?

A slug is the readable part of a URL that names the page, like /blog/static-vs-dynamic-qr-codes/. On a short link it is the back-half, as in go.yourbrand.com/spring-sale. Good slugs are short, lowercase and say what people will get.

Google's URL guidelines recommend hyphens rather than underscores to separate words, because hyphens clearly mark a word boundary for both people and search engines. The generator always uses hyphens.

  • Lowercase only. Some servers treat /Spring and /spring as different pages; lowercase avoids duplicates and typos.
  • Plain letters. Accents are transliterated (café becomes cafe) so the slug is easy to type on any keyboard.
  • Two to five words. Dropping stop words keeps the meaning and saves characters.
  • No dates that will age, unless the page really is about that year.

How many combinations does a random short code have?

Random codes use base62: the 26 lowercase letters, 26 capitals and 10 digits. Each extra character multiplies the number of possible codes by 62. Leaving out the five look-alikes (0, O, 1, l and I) uses 57 characters instead, which costs some combinations but makes codes safe to read aloud or copy from print.

LengthBase62 (62 characters)No look-alikes (57 characters)
414,776,33610,556,001
5916,132,832601,692,057
656,800,235,58434,296,447,249
8218,340,105,584,896111,429,157,112,001
913,537,086,546,263,5526,351,461,955,384,057
123,226,266,762,397,899,821,0561,176,246,293,903,439,668,001

How long should a short code be?

Short enough to fit, long enough not to be guessed. Four characters gives millions of codes, which is plenty for public links and keeps a link like b1.lc/AbC9 at 10 characters in total. For anything private, such as a shared document or an invoice, use a longer random code: BN Shortener's private links use 9-character codes for that reason, and it blocks any visitor who tries more than 200 unknown codes in 10 minutes.

One more check: if a system treats codes as case-insensitive, mixed case adds nothing, and you should count 36 characters (letters plus digits) per position. BN Shortener's custom aliases are case-insensitive, 3 to 50 characters long, and may use letters, digits, hyphens and underscores. Our guide to choosing a good custom back-half has naming examples.

Sources

  1. URL structure best practices for Google Search, Google Search Central, checked 2026-10-23
  2. RFC 3986: URI generic syntax (unreserved characters), checked 2026-10-23

Questions

What is a slug in a URL?

The part of the address that names a specific page or link, usually after the last slash. In example.com/blog/how-to-tag-links, the slug is how-to-tag-links.

Should I use hyphens or underscores in a slug?

Hyphens. Google's URL guidance recommends hyphens to separate words, because underscores are often read as joining words together.

What are stop words, and should I remove them?

Small words such as a, an, the, and, of and for. Removing them makes the slug shorter while keeping its meaning. Keep one when the slug reads badly without it.

Why avoid 0, O, 1, l and I in short codes?

They look alike in many fonts, so people misread or mistype them when a code is printed, spoken or handwritten. Leaving them out avoids dead links from typos.

Do you see or store the codes I generate?

No. Slugs and codes are made in your browser and nothing is sent to a server, so we never see what you create.

Does the generator check whether a code is already taken?

No, it runs entirely in your browser and knows nothing about your links. Your link shortener or CMS will tell you if a code is in use. In BN Shortener, back-halves on b1.lc and on custom domains share one namespace, so a popular word may already be taken; a more specific slug such as spring-menu usually is not.

Try it on your next link

The Free plan includes a custom domain, 5 dynamic QR codes, a bio page and click analytics. No credit card.