Slug Generator
100% LocalConvert any text into a URL-friendly slug with Unicode support.
how-to-build-a-rest-api-with-nodejs35 charsType a title or paste text. The slug converts to lowercase with hyphens and strips special characters.
Learn More
What is Slug Generator?
Frequently Asked Questions
Technical Deep Dive
Slug Generator
Transform text into clean URL slugs with full Unicode transliteration (accented characters, umlauts, etc.). Supports kebab-case, snake_case, camelCase, and dot.case styles with configurable max length.
Instant Generation
Type, tweak, copy, no waiting on a server round-trip or sign-up flow.
Fine-Grained Control
Every knob you'd reach for is exposed, with sensible defaults for the common case.
Verified Output
Generated values are sanity-checked against spec or canonical implementations.
01 Slug Convention Matrix
| Style | Example Output | Standard Use Case | SEO Value |
|---|---|---|---|
| Kebab Case | my-slug-name | Web URL Paths (Standard) | High |
| Snake Case | my_slug_name | Filenames, DB Keys | Medium |
| Camel Case | mySlugName | API Responses, JS Props | Low |
| Dot Case | my.slug.name | Package Routing | Low |
02 Normalization Pipeline
03 Where Slugs Show Up
A slug is any human-readable identifier that has to survive URL transport, filesystem rules, and shell quoting. The same normalization logic powers each, once you understand RFC 3986's reserved characters, you understand all of them.
-
Blog post URLs "How to Debug CORS Errors" →
/blog/how-to-debug-cors-errors. The slug becomes part of the canonical URL and gets indexed by search engines, kebab-case is the standard because Google treats hyphens as word boundaries but underscores as joiners. -
SEO-friendly product IDs "Wool Cardigan, Olive, Size L" →
wool-cardigan-olive-size-l. Pair with a stable numeric ID in the URL (/p/12345/wool-cardigan-olive-size-l) so you can rename the slug without breaking external links. -
S3 / blob storage filenames S3 keys allow most characters but break in subtle ways with spaces,
+, and certain Unicode. Slugifying user-uploaded filenames before storing them avoids URL-encoding surprises in presigned URLs. -
GitHub branch names from issue titles "Fix CORS error in /api/users (regression from #4321)" →
fix-cors-error-in-api-users-regression-from-4321. Git refuses certain characters (:,?,*, spaces). Slugification handles all of them in one pass. -
RFC 3986 as the spec floor RFC 3986 § 2.3 defines the unreserved character set:
ALPHA / DIGIT / "-" / "." / "_" / "~". Any character outside this set must be percent-encoded, which is ugly. Slug generation transliterates them away to keep URLs clean.
04 Worked Examples
Café 25¢, naïve
cafe-25c-naive
The pipeline applies Unicode UAX #15 NFKD normalization, which decomposes é into e + U+0301 (combining acute). Strip combining marks and you get plain e. ¢ has a compatibility decomposition to c under NFKD; emoji and symbols without ASCII equivalents are dropped.
"API Reference" → api
"Admin Panel" → admin
"How to Handle Null" → null
"New Post" → new (some frameworks reserve)
/blog/api-reference (namespace under /blog/)
/admin (route reserved for app)
/blog/how-to-handle-null (namespace prefix saves you)Always namespace user-generated slugs under a route segment (/blog/, /u/, /p/). Otherwise a user can title their post "Admin" and steal the admin URL. Maintain a denylist of reserved slugs (api, admin, null, undefined, your framework's reserved routes) for the rare slugs that escape namespacing.
Post 1: "Year in Review" → year-in-review
Post 2: "Year in Review" → year-in-review ← conflict!Numeric suffix: year-in-review-2
Year disambig: year-in-review-2024
Random suffix: year-in-review-a3f9
Hash suffix: year-in-review-7c4e2b (stable hash of id)Numeric suffixes are most readable but require a DB lookup ("does this slug exist?") at insert time. Random or hash suffixes avoid the lookup but trade away readability. Pick numeric for low-volume content (blogs), random for high-volume user-generated paths (social posts).
05 Related Tools
Slugs sit between editorial input and URL output. These tools handle the surrounding stages.
Case Converter
When you need snake_case or camelCase variants of the same identifier, database columns, JSON keys, env vars.
URL Encoder
When you cannot transliterate and need percent-encoding instead (legacy systems, search query strings).
URL Parser
Pull the slug back out of a full URL to verify your routing layer is reading the path segments you expect.