Slug Generator
Turn any text into a clean URL-safe kebab-case slug.
- slug
- url
- kebab
- permalink
- seo
About Slug Generator
A slug is the readable part of a URL — the bit after the last slash that names the page (e.g. /blog/my-first-post). Good slugs are short, lowercase, made of ASCII letters and digits, and use a single character (usually a hyphen) to separate words. They're better for SEO than auto-generated IDs, they make links easier to read, and they survive being copy-pasted into chat clients that might otherwise break on special characters.
This generator takes any arbitrary text — accented characters, punctuation, mixed case, extra whitespace — and produces a clean slug suitable for URLs, filenames, or anywhere else you need a safe identifier. Accents are stripped, punctuation is dropped, and runs of separator characters are collapsed.
How to use
Paste or type your text — a title, heading, or filename idea — into the input. The slug appears below, updating live as you type.
Pick the separator from the dropdown: hyphen for the standard URL slug (kebab-case), underscore for snake-case identifiers, dot for some filename conventions, or "none" to run the words together. The "Lowercase" checkbox is on by default but can be turned off if you want to preserve case. Hit the copy button beside the slug to lift it onto your clipboard.
Frequently asked questions
Why are hyphens better than underscores for URL slugs?
Google has long treated hyphens as word separators and underscores as letters, meaning "my-first-post" indexes as three words while "my_first_post" indexes as one. Hyphens are also visually clearer in unstyled URLs (where underscores can hide beneath the link's underline). Use hyphens for public-facing slugs and underscores for internal identifiers.
Does the slug preserve accented characters?
No — accents are stripped to their plain-ASCII equivalents. "Café" becomes "cafe", "naïve" becomes "naive", "São Paulo" becomes "sao-paulo". This keeps URLs portable across mail clients, chat apps, and old web frameworks that mishandle non-ASCII characters.
Why is there a maximum sensible slug length?
There isn't a hard limit, but slugs over about 60 characters get truncated in search snippets and become awkward in shared links. Aim for 3–7 words; if your title is longer, hand-edit the result to keep the most descriptive words at the front.
What's the difference between a slug and an ID?
A slug is human-readable; an ID is opaque. Slugs (e.g. /blog/redesigning-the-checkout) are better for SEO and easier to share, but they can change if the title changes. Many systems use both — the slug for the public URL, an internal ID for permanent record-keeping — and add redirects when slugs rename.
More Text & Encoding tools
JSON Formatter
Pretty-print, validate, or minify JSON with helpful error positions.
Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to text. UTF-8 safe.
URL Encoder / Decoder
Percent-encode or decode URLs and query parameters.
JWT Decoder
Decode a JSON Web Token to inspect its header and payload.