Slug generator

Convert any text to a URL-friendly slug. Configurable separators, accent transliteration, and length limits.

Separator
Max length
Transliterate accents
slug-appears-here

What is a URL slug?

A URL slug is the human-readable part of a web address that identifies a specific page. In https://example.com/blog/my-first-post, the slug is my-first-post. Good slugs are concise, descriptive, and use only lowercase letters, numbers, and hyphens.

Slugs matter for two reasons: SEO and usability. Search engines use URL keywords as a ranking signal — a URL containing /generators/password tells Google what the page is about. For users, a clean slug is easier to read, share, and remember than a string of query parameters or random IDs.

Most web frameworks and CMS platforms generate slugs automatically from page titles, but the automatic output often needs manual refinement — removing stop words, trimming length, and ensuring the slug accurately represents the content.

Slug best practices

Keep it short. Aim for 3–5 words. Long slugs get truncated in search results and are harder to share. Remove stop words like "a", "the", "and", and "of" unless they're essential to the meaning.

Use hyphens, not underscores. Google treats hyphens as word separators but treats underscores as joiners. The URL /web-development matches searches for "web" and "development" separately, while /web_development may not.

Include target keywords. If your page targets "React performance tips", the slug /react-performance-tips reinforces that signal to search engines.

Never change slugs after publishing unless you set up a proper 301 redirect. Changing a slug breaks every inbound link and shared URL pointing to that page, and you lose any SEO authority the old URL had accumulated.

Use lowercase only. URLs are case-sensitive on most servers. Mixing cases leads to duplicate content issues and broken links.

Frequently asked questions

Should I use hyphens or underscores in URLs?
Use hyphens. Google's official recommendation is to use hyphens (-) rather than underscores (_) as word separators in URLs. Google treats hyphens as word separators, so web-development is interpreted as two words ("web" and "development"), while web_development may be treated as a single token. This distinction matters for SEO because it affects how search engines match your URL to search queries.
How should I handle non-Latin characters in slugs?
The safest approach is transliteration — converting accented and non-Latin characters to their closest ASCII equivalents (e.g. ñn, üu, cafécafe). This ensures maximum compatibility across browsers, servers, and APIs. Some CMS platforms support internationalised slugs with percent-encoded UTF-8 characters, but these can be harder to read and share. If your audience primarily uses a non-Latin script, consider a mix: transliterate for the URL but keep the original text in the page title.