Slug Generator
Convert any text string into a clean, SEO-friendly URL slug.
From a title to a route segment
A slug is the compact text used to identify a resource in a path, for example release-notes-2026 in /blog/release-notes-2026. This URL slug generator turns a heading or name into a lowercase ASCII-oriented value, updates it while you type, and lets you copy the result into a route, content record, filename convention, or CMS field.
Enter a phrase in Input String, choose a separator, and decide whether digits should remain. The generated value appears immediately. The available separators are hyphen (-), underscore (_), and slash (/). Hyphens are the conventional choice for a single readable URL segment; the alternatives serve systems with different identifier rules.
Exactly how the conversion works
The transformation follows a predictable sequence:
- Remove whitespace from the beginning and end of the input.
- Convert letters to lowercase.
- Decompose accented characters and remove combining diacritical marks.
- Optionally remove digits
0through9. - Replace every character outside lowercase
a-zand digits with the chosen separator. - Collapse repeated separators into one.
- Remove a separator from the beginning or end.
For example:
Input: Crème brûlée: 10-minute guide!
Hyphen output: creme-brulee-10-minute-guide
Strip Numbers: creme-brulee-minute-guide
Underscore output: creme_brulee_10_minute_guide
This process is more than replacing spaces. Punctuation, symbols, emoji, and unsupported letters become boundaries. Several adjacent symbols create only one separator, so Design & Build becomes design-build, not design---build.
Choosing the separator deliberately
Hyphen
Use - for most article, documentation, product, and category slugs. It is visually clear and broadly accepted in web routes:
/guides/configure-local-cache
Underscore
Use _ when the destination is an internal identifier, export field, or legacy routing system that explicitly expects underscores. Avoid inventing a second convention when an existing project already uses hyphens.
configure_local_cache
Slash
Slash produces a path-like value rather than a single path segment:
configure/local/cache
That can be useful for drafting nested paths, but it changes routing semantics. Many frameworks interpret each slash-delimited portion as a separate segment. Copying a slash output into a database field that expects one slug may break lookup, uniqueness, breadcrumbs, or static route generation. Treat this option as a path generator only when your application is designed for it.
The generator collapses repeated chosen separators. When slash is selected, punctuation and spaces can create segment boundaries. It does not validate . or .. semantics because periods are replaced rather than retained, and it does not prepend a leading slash.
Keep or strip numbers?
Digits can carry essential identity. css-grid-2026, iphone-17-case, chapter-4, and version-2-api mean something different after numbers are removed. Leave Strip Numbers off when a year, model, edition, ranking, or version helps distinguish the page.
Enable it when digits are incidental, volatile, or prohibited by an external naming policy. Remember that deletion happens before separators are normalized. Top 10 Ideas becomes top-ideas, while ISO9001 checklist becomes iso-checklist. The generator does not spell numbers out.
If removing digits creates the same slug for two titles, resolve the collision manually. “Report 2025” and “Report 2026” both become report with stripping enabled. A route system should enforce uniqueness separately.
Accents, scripts, and transliteration
Common Latin letters with diacritics are decomposed, allowing café to become cafe and jalapeño to become jalapeno. This is accent removal, not full transliteration. Characters that do not reduce to a-z or 0-9 are replaced by the separator.
As a result, titles written in Cyrillic, Greek, Arabic, Chinese, Japanese, Hindi, and many other scripts may lose their words or yield an empty output. Some Latin characters such as ø, ł, or ß may also need explicit mappings that this implementation does not provide. For multilingual publishing, choose a routing policy intentionally: preserve percent-encoded Unicode slugs, use a language-specific transliterator, or assign stable opaque IDs with optional readable aliases.
Emoji and typographic symbols are treated as separators. Fast ⚡ Setup becomes fast-setup. Curly apostrophes, ampersands, and plus signs do not get expanded into words, so R&D becomes r-d, C++ Guide becomes c-guide, and What's New becomes what-s-new. Edit the source phrase first if a connecting word matters: research and development produces a clearer result.
A publishing workflow that avoids broken links
Generating a clean slug is easy; managing its lifecycle is the important work.
- Start from a concise, descriptive title rather than pasting an entire subtitle.
- Generate with the project’s established separator and digit policy.
- Read the slug aloud by segments. Rewrite awkward symbol conversions or lost abbreviations.
- Check reserved routes such as
admin,api,login,assets, and framework-specific filenames. - Verify uniqueness within the route scope, including case-insensitive storage if applicable.
- Store the accepted slug as persistent content data rather than regenerating it on every title edit.
- If a published slug changes, configure a permanent redirect from the previous URL and update canonical references and internal links.
A title is editorial and can evolve. A URL is an address that may be bookmarked, shared, cited, cached, and indexed. Automatically changing it whenever punctuation or wording changes creates avoidable 404 errors. Many CMSs generate once, then allow deliberate edits with redirect support.
Slugs are not complete URLs
The output contains no protocol, hostname, query string, fragment, percent encoding, or route validation. my-first-post can become part of https://example.com/articles/my-first-post, but the generator does not assemble or verify that URL.
A slug is also not automatically safe for every storage context. Database schemas may impose maximum length, unique indexes, collations, or reserved values. Filesystems differ in case handling and reserved names. Package registries and social platforms have their own character sets. Confirm the destination’s contract.
Do not put secrets, private customer names, tokens, internal IDs, or sensitive search terms in public paths. URLs appear in browser history, analytics, referrer headers, logs, screenshots, and shared messages. Readability does not imply privacy.
Naming collections consistently
When creating several related routes, generate them as a set and inspect rhythm and scope:
getting-started
configure-authentication
deploy-to-production
troubleshooting
Avoid needless mixtures such as nouns for some pages and full questions for others unless that distinction is part of the information architecture. Keep abbreviations consistent. Decide whether articles are omitted, whether version numbers live in parent segments, and whether singular or plural nouns represent collections.
For hierarchical documentation, slash mode can sketch guides/authentication/oauth, but route ownership should still be decided by the site structure. A generated slash does not create folders, page files, navigation entries, or redirects.
Collision and stability examples
Different titles can normalize to the same result:
Café Guide -> cafe-guide
Cafe Guide -> cafe-guide
R & D -> r-d
R/D -> r-d
Version 1 -> version (with Strip Numbers)
Version 2 -> version (with Strip Numbers)
Resolve collisions with meaningful qualifiers, a stable numeric suffix, or a scoped parent path. Avoid random suffixes unless opacity is acceptable. The tool cannot query your CMS or router, so uniqueness remains an application concern.
Length also deserves judgment. Technically accepted paths can still be cumbersome in navigation, logs, support calls, and printed material. Remove redundant words, but do not shorten a slug until it becomes cryptic. There is no automatic stop-word removal here, and that is useful because words like “to,” “for,” or “not” can affect meaning.
Questions before copying
Is the generated slug guaranteed to be unique?
No. It is derived only from the current input and settings. Check existing records or enforce a unique constraint in the destination.
Does it convert spaces to hyphens?
Yes when Hyphen is selected, but it also converts punctuation and every other disallowed character to that separator, then collapses repeats.
Why is my non-English title empty?
The allowed output is ASCII a-z plus optional digits. Accent marks on many Latin letters can be removed, but scripts requiring transliteration are not converted to Latin equivalents.
Should a slug include the year?
Keep it when the year distinguishes recurring reports, events, regulations, or editions. Omit it when it will make evergreen content look stale or force unnecessary redirects. This is a content-lifecycle decision.
Can I paste the output directly after a domain?
For hyphen or underscore output, usually as one route segment after the appropriate path and slash. Slash mode may create several segments. Your framework may still require encoding, route files, or database records.
What happens if the input contains only symbols?
Disallowed characters become separators, which are then trimmed from the ends. The final output can be empty; the panel displays the selected separator as a visual placeholder. Do not mistake that placeholder for a meaningful generated slug.
Does changing a separator alter published pages?
The tool changes only its generated text. If you apply that text to a live route, your application must handle migrations and redirects. Prefer one convention across a site unless there is a concrete compatibility reason to change it.