Slug Generator

Turn any title, headline, or phrase into a clean, SEO-friendly URL slug. Strips accents, lowercases text, removes punctuation, and replaces spaces with hyphens — all in your browser, with optional stopword removal and length limits.

How to Use This Tool

  1. Type or paste — put a title, phrase, or sentence in the input field above.
  2. Watch it update — the slug preview updates on every keystroke.
  3. Customise — change the separator, cap the length, toggle lowercase, or remove stopwords like the, and, of.
  4. Copy — click the slug or the Copy Slug button to put it on your clipboard.

What Is a URL Slug?

A URL slug is the readable portion of a URL that identifies a specific page. In janeer.com/guides/what-is-base64-encoding, the slug is what-is-base64-encoding. Slugs sit at the end of a URL path and are the most visible, shareable, and SEO-relevant part of the address.

A well-crafted slug is concise, descriptive, lowercase, separated by hyphens, and contains only ASCII letters, numbers, and hyphens. Search engines use slugs as a ranking signal — a clear slug with the primary keyword ranks better than ?id=73920. Users also scan slugs when deciding whether to click a link, so readable slugs tend to earn more clicks in search results and on social media.

Common slug transformations include lowercasing (Hello Worldhello-world), accent stripping (cafécafe), punctuation removal (why? it works!why-it-works), and deduplication of separators (a--ba-b). This tool applies all of them by default and lets you tweak the output.

Slug Best Practices

Stick to ASCII. While modern browsers support Unicode URLs, percent-encoded characters look noisy in search results, and some email clients and chat apps break on them. Transliterate accented characters to their closest ASCII equivalents.

Use hyphens, never underscores. Google treats hyphens as word separators but underscores as part of a single word. react-tutorial is indexed as two words; react_tutorial is indexed as one.

Keep it short. Aim for 3-6 meaningful words under 60 characters. Google truncates long URLs in results, and shorter slugs are easier to remember and share.

Make slugs permanent. Changing a slug breaks existing links and costs SEO value. If you must rename, set up a 301 redirect from the old URL to the new one.

Avoid dates you will regret. Slugs like best-tools-2024 age poorly. Use undated slugs (best-tools) and update the article in place, or commit to maintaining a new URL each year.

Frequently Asked Questions

What is a URL slug?
A URL slug is the human-readable part of a URL that identifies a specific page, typically coming after the domain and section — for example, in janeer.com/guides/what-is-base64-encoding, the slug is what-is-base64-encoding. A good slug is short, descriptive, uses hyphens between words, contains only lowercase ASCII letters, numbers, and hyphens, and reflects the page's topic so both users and search engines can understand it at a glance.
Should slugs use hyphens or underscores?
Use hyphens. Google has explicitly recommended hyphens for URL slugs since 2007 because search engines treat hyphens as word separators but treat underscores as part of a single token. So my-blog-post is indexed as three words while my_blog_post is indexed as one. Hyphens are also more readable and the universal convention across the web.
How long should a URL slug be?
Keep slugs concise — typically under 60 characters and 3 to 6 words. Long slugs get truncated in search results, are harder to share verbally, and often contain filler words that hurt rather than help SEO. Capture the essential keywords from the title and drop the rest. If your page title is The 10 Best JavaScript Frameworks for Building Scalable Single Page Applications in 2026, a slug like best-javascript-frameworks-2026 works better than the full title.
How should I handle accented and non-Latin characters in slugs?
Transliterate to ASCII for maximum compatibility. Café becomes cafe, über becomes uber, naïve becomes naive. Modern browsers and search engines do support Unicode (IDN) URLs, but transliterated slugs are safer for email clients, chat links, and older systems that do not handle percent-encoded Unicode gracefully. This tool uses Unicode NFD normalization followed by diacritic stripping — the same technique libraries like slugify use.
Should I include stopwords like "the" and "and" in slugs?
Usually not. Stopwords rarely add keyword value and only make URLs longer. the-history-of-the-internet can safely become history-of-internet or even history-internet. Use your judgement — occasionally a stopword is meaningful (like "what is x" being the actual search query), but most of the time dropping them is a net win. This tool offers an optional stopword filter for exactly this purpose.