Technology
URL Slug Generator
Turn any title into a clean, SEO-friendly URL slug. Strips accents, lowercases text, and replaces spaces with hyphens live as you type — with an optional length limit.
URL Slug Generator
Method
How this calculator works
slug = text.normalize('NFD').replace(accents, '').toLowerCase().replace(/[^a-z0-9]+/g, '-') with leading, trailing, and duplicate hyphens collapsed.
- Type or paste a title, heading, or phrase into the input field.
- The tool normalizes accents, lowercases the text, and replaces every run of non-alphanumeric characters with a single hyphen.
- Leading, trailing, and duplicate hyphens are removed to produce a clean slug.
- Optionally set a maximum length to trim long slugs to a tidy size.
Use cases
When to use it
- Creating clean, SEO-friendly URLs for blog posts and articles.
- Generating consistent identifiers for CMS entries.
- Turning product names into readable page paths.
- Producing anchor IDs and file names from headings.
FAQ
Frequently asked questions
What is a URL slug?
A URL slug is the human-readable part of a web address that identifies a specific page, usually derived from the page title. For example, in /blog/how-to-bake-bread the slug is how-to-bake-bread.
Why should slugs be lowercase with hyphens?
Lowercase avoids case-sensitivity issues on some servers, and hyphens are the search-engine-preferred word separator because they are treated as spaces, improving readability and SEO.
How are accented characters handled?
The generator normalizes text with Unicode NFD and strips the diacritical marks, so café becomes cafe and naïve becomes naive, keeping slugs ASCII-safe.
Should I set a maximum length?
Short, descriptive slugs are easier to read and share. Setting a max length trims overly long slugs at a word boundary, which many content teams cap between 50 and 75 characters.
Does this tool run offline?
Yes. The slug is generated live in your browser as you type, with no network requests, so your titles stay private.
Related tools
All calculators →Text Case Converter
Convert text to UPPERCASE, lowercase, Title Case, camelCase and more.
Open
URL Encoder / Decoder
Percent-encode or decode URLs and query strings instantly.
Open
Word Counter
Count words, characters, sentences, paragraphs, and estimate reading time instantly.
Open