Slug Generator

Turn a title or phrase into a clean, lowercase, hyphen separated URL slug.

How to use

  1. Type or paste your title.
  2. Press Make Slug.
  3. Copy the slug into your page address.

Good to know

Short, readable slugs are easier to share and remember.

This tool is free, needs no sign-up and runs in your browser. Explore more on the Tools page.

Why do URL slugs matter more than most people think?

A slug is the last readable part of a web address, the bit after the final slash that names a specific page. In example.com/blog/how-to-brew-cold-coffee/, the slug is how-to-brew-cold-coffee. It shows up in shared links, search results and bookmarks. A clean slug tells a reader what to expect before they click. A messy one, full of percent codes, random numbers and stray symbols, makes a link look untrustworthy and hard to read aloud or type from memory.

Search engines also use the words in a URL as a light hint about what a page covers. It is not a magic ranking lever, but it costs nothing to get right. This guide goes beyond the basics: how a slug is actually built, what to put in it, how long it should be, whether to keep small words, and what to do when you need to change one after publishing.

How does a slug generator turn a title into a URL?

Titles are written for people, so they contain capital letters, spaces, accented characters and punctuation. URLs are far more restrictive. Spaces must be encoded, many symbols have special meanings, and non-ASCII letters get converted into unreadable percent sequences. A generator solves this with a short, predictable pipeline:

  1. Lowercase everything. Web servers can treat /About and /about as different paths, which risks duplicate pages. Lowercase removes the ambiguity.
  2. Strip accents. Characters such as é, ü and ñ are decomposed into a base letter plus a combining mark, and the mark is discarded. "Café" becomes "cafe".
  3. Replace everything else with hyphens. Any run of characters that is not a letter or digit, such as spaces, punctuation, apostrophes and symbols, collapses into a single hyphen.
  4. Trim the ends. Leading or trailing hyphens are removed.

The result uses only lowercase letters, digits and hyphens, the safest character set for a URL. Hyphens are preferred over underscores because search engines treat a hyphen as a word separator, while an underscore can make two words read as one long token.

How do you use the slug generator?

  1. Type or paste your page title, post headline or product name into the input box.
  2. Press the Generate button and read the slug that appears. It is built from your text using the steps above.
  3. Edit your original text if the result is too long or contains words you would rather drop, then generate again.
  4. Copy the slug and paste it into the permalink or URL field of your CMS, static site config or file name.

Treat the output as a starting point. The tool does the mechanical cleanup, but you decide whether the words are the right ones.

What do real conversions look like?

Here are three realistic titles and the slugs the generator produces.

TitleSlug
10 Tips for Better Sleep!10-tips-for-better-sleep
Café Résumé Tips: What's New?cafe-resume-tips-what-s-new
The Ultimate Guide to Cold Brew the-ultimate-guide-to-cold-brew

Notice what happened in the second row: the accents were removed, the colon and question mark disappeared, and the apostrophe turned into a hyphen, so "What's" became "what-s". Some people prefer to write "whats" by deleting the apostrophe from the title before generating, which gives a cleaner slug. In the third row, the extra spaces were collapsed and trimmed away.

How long should a slug be, and should you remove stop words?

There is no official character limit in the URL standard that you will realistically hit, but shorter is better for readability. As a practical guide, aim for three to six meaningful words. Long slugs get truncated in search results and chat previews, are harder to share verbally, and tend to repeat the title word for word, which adds nothing.

The stop word debate is a classic. Stop words are small connecting words such as "a", "the", "of", "and" and "to". One camp says remove them to keep URLs tight. The other says keep them because they make the slug read like natural language. Both positions are defensible, and neither is a ranking secret. A sensible approach:

  • Drop stop words when doing so leaves the meaning intact and saves real length, for example guide-to-cold-brew instead of the-ultimate-guide-to-cold-brew.
  • Keep them when removing them changes the meaning or makes the phrase awkward, as in how-to-train-a-dog, where how-train-dog looks clipped.

Also avoid stuffing the same keyword into the slug repeatedly. best-cheap-best-laptops-cheap-laptop helps nobody.

Should dates, categories and numbers go in the slug?

Dates in a slug make evergreen content look stale and are painful to maintain. If you update a 2023 article in 2026, a URL that says 2023 sends the wrong signal. Leave dates out unless the page is genuinely tied to a specific year, such as an annual report. Numbers in list posts are fine, but remember that if you change "10 tips" to "12 tips" later, the slug will no longer match the title.

What happens when you change a slug after publishing?

Changing a live URL is the single riskiest slug decision. Every link pointing to the old address, from other sites, social posts, email newsletters and bookmarks, will break unless you set up a redirect. A permanent redirect (usually called a 301) tells browsers and search engines that the page has moved for good and sends visitors to the new address. Without it, visitors see an error page and search engines may eventually drop the old page and treat the new one as brand new content.

If you must change a slug:

  1. Decide whether the benefit is real. Fixing a typo or removing a misleading word can be worth it. Chasing a marginally tidier URL usually is not.
  2. Create a permanent redirect from the old path to the new one before or at the same moment you publish the change.
  3. Update internal links on your own site to point directly to the new address instead of relying on the redirect.
  4. Check that the old URL actually lands on the new page.

Many content management systems add a redirect automatically when you edit a permalink, but plenty do not. Verify rather than assume.

How do slugs work in WordPress and other CMS platforms?

Most platforms generate a slug automatically from the title the first time you save a draft. WordPress, for instance, shows an editable permalink field in the post settings. Static site generators often derive the slug from the file name, while e-commerce platforms may build it from the product name. The auto-generated version is often fine but can be overly long or can include filler words, which is where a manual pass helps. Paste your cleaned slug into the field, save, and check the preview link.

What are the most common slug mistakes?

  • Using underscores or spaces. Hyphens are the standard word separator.
  • Leaving capital letters in. Mixed case invites duplicate or broken links on case-sensitive servers.
  • Changing slugs casually. Every change is a potential broken link.

Who benefits from a slug generator?

Bloggers and editors use it to keep permalinks tidy across hundreds of posts. Developers use it to create file names, route paths and database keys from user-entered text. Small business owners use it when adding product or service pages to a website builder.

Is it private and safe to use?

Yes. The conversion runs entirely in your browser. The text you type is not uploaded, stored or sent to a server, so you can safely paste unpublished headlines, client project names or draft titles.

What are the limitations?

The tool produces a clean, mechanical slug, but it cannot judge quality. It will not shorten a long title for you, remove stop words, or decide whether a keyword belongs. Accent stripping works for common Latin-script characters, but languages written in other scripts, such as Arabic, Chinese or Cyrillic, will have those characters removed and may not convert into a meaningful Latin slug, so you may prefer to write a transliteration yourself. It also cannot check whether the slug is already used on your site, so duplicates are your responsibility.

Frequently asked questions

Are hyphens or underscores better in a URL?

Hyphens are better. Search engines treat hyphens as spaces between words, whereas underscores can cause words to be read as a single term, so hyphens are the widely recommended choice.

Do slugs directly affect search rankings?

A descriptive slug gives a small hint about page content and improves how links look to people, but it is a minor factor. Content quality and relevance matter far more.

Should I include the year in a slug?

Usually not, because it makes updated content look outdated. Include a year only when the page is truly about that specific year and will not be refreshed.

What happens to apostrophes?

They become hyphens, so "What's" becomes "what-s". Delete the apostrophe from your title first if you want "whats".

Is there a maximum slug length?

Browsers and servers accept very long URLs, but for readability aim for roughly three to six meaningful words. Shorter slugs are easier to read, share and remember.

Do I need a redirect if I only fix a typo in the slug?

If the old URL was ever published or shared, yes. Anyone using the old address would otherwise hit an error, so add a permanent redirect to the corrected one.

Putting it together

A good slug is short, lowercase, hyphenated and written for humans first. Use the generator to handle the tedious cleanup, trim the result by hand, and think twice before changing it once the page is live. You can find more utilities like this one among our other free tools. If you are drafting titles at the same time, the Case Converter helps format headlines, and the Word Counter checks title and description lengths. Writers building page content may also like the Lorem Ipsum Generator for mockups, and developers working with data can pair this with the JSON Formatter.

Scroll to Top