Slugify — Text to URL Slug
Turn any text into a clean URL slug with a hyphen or underscore separator, plus optional lowercasing, accent stripping and repeated-separator collapsing.
Slugify — Text to URL Slug — Slugify converts a title or phrase into a clean, URL-safe slug: it replaces spaces, punctuation and symbols with a separator and keeps only letters and digits. Choose a hyphen or underscore separator, lowercase the result, strip accents from characters like é or ñ, and collapse repeated separators. Every conversion runs entirely in your browser, so nothing you type is ever uploaded.
What is Slugify — Text to URL Slug?
Slugify is a free online slug generator that turns a title, headline, or any phrase into a clean URL slug — the readable part of a web address, like "my-first-blog-post". Developers, bloggers, and SEO specialists use it to create permalinks, file names, anchor IDs, and CSS class names from human-readable text. It keeps only ASCII letters and digits, replacing every space, punctuation mark, and symbol with your chosen separator. You can pick a hyphen (the kebab-case standard for URLs) or an underscore, force the slug to lowercase, strip diacritics so accented characters such as é, ü, and ñ become e, u, and n, and collapse runs of repeated separators into one. Because the widget renders only with JavaScript, this text is the indexable description: convert text to a URL slug, generate a permalink, and clean up a string for use in a link.
How to use Slugify — Text to URL Slug
- Type or paste your title or text into the Input box.
- Open the settings panel and choose a separator: hyphen (-) for standard URLs or underscore (_).
- Toggle Lowercase to force the slug to lower case, on by default.
- Toggle Strip accents to convert characters like é or ñ to plain ASCII (e, n).
- Toggle Collapse repeats to merge runs of separators into a single one.
- Read the finished slug in the read-only Output box and click Copy to use it.
Examples
Blog post title to a hyphen slug
Input
My First Blog Post!
Output
my-first-blog-post
Strip accents from a name
Input
Café del Mar
Output
cafe-del-mar
Underscore separator, keep repeats
Input
Hello World
Output
hello___world
Frequently asked questions
- What is a URL slug?
- A slug is the human-readable part of a web address that identifies a page, such as "my-first-blog-post" in example.com/blog/my-first-blog-post. A good slug uses only lowercase letters, digits, and hyphens, which is exactly what this tool produces.
- What is the difference between the hyphen and underscore separator?
- Hyphen (-) is the convention for URLs and SEO, because search engines treat hyphens as word boundaries — pick it for permalinks. Underscore (_) is common for file names, code identifiers, and CSS, where a hyphen may not be wanted. The tool uses your chosen character to join the words.
- What does Strip accents do?
- It normalizes the text (Unicode NFKD) and removes combining diacritical marks, so accented Latin characters are reduced to plain ASCII: é becomes e, ñ becomes n, ü becomes u. Characters with no ASCII equivalent, such as most CJK or emoji, are dropped because the slug keeps only A–Z, a–z, and 0–9.
- What does Collapse repeats do?
- With it on, several separators in a row are merged into one, so "Hello World" becomes "hello-world". With it off, each space, punctuation mark, or symbol becomes its own separator, so the same input becomes "hello---world". Leading and trailing separators are always trimmed either way.
- Is my text uploaded to a server?
- No. The whole conversion runs 100% client-side in your browser using built-in JavaScript string functions. Nothing you type is uploaded, stored, or sent anywhere, so you can safely slugify private titles, internal page names, or sensitive content.
Related tools
Base32 / Base58 Encode / Decode
Encode text to Base32 (RFC 4648) or Base58 (the Bitcoin alphabet) and decode either one back to text, fully UTF-8 safe and entirely in your browser.
Base64 Encode / Decode
Encode text to Base64 or decode Base64 back to text (UTF-8 safe).
Case Converter & Counter
Change text case and count characters, words and lines.
Code Formatter & Minifier
Beautify or minify HTML, CSS and JavaScript instantly in your browser, with 2-space, 4-space or tab indentation and Terser-powered JavaScript compression.