Text to Slug
Convert any text or title into a clean, URL-friendly slug. Handles spaces, special characters, diacritics, and unicode.
Frequently Asked Questions
https://example.com/blog/how-to-build-rest-api, the slug is how-to-build-rest-api. Good slugs are lowercase, use hyphens, and contain only letters, numbers, and separators./Blog/Post and /blog/post are different URLs. Lowercase slugs avoid duplicate content issues (for SEO) and user confusion when typing URLs manually. Google recommends lowercase URLs.café becomes cafe./blog/2024/how-to-bake-bread, the slug is how-to-bake-bread. A permalink is the full, permanent URL including the domain, path, and slug: https://example.com/blog/how-to-bake-bread. Slugs are a component of permalinks. WordPress calls its full URL structure a "permalink" but lets you customize the slug portion.
& becomes and; % becomes percent; # is removed; @ is removed. Characters like ?, =, and & are reserved in URLs and will break query string parsing if included literally. This tool automatically removes non-alphanumeric characters and converts & to "and".
/blog/2024/my-post), product IDs (/product/42), and version numbers (/docs/v3). Numbers do not need to be at the beginning or end — they can appear anywhere in the slug. This tool preserves all numeric characters in the output.
transliterator_transliterate() or the JavaScript transliteration npm package are needed.
<link rel="canonical"> tag to determine which URL to index. Consistent, clean slugs help prevent duplicate content: if you have /blog/My-Post and /blog/my-post, only one should be canonical. Always use lowercase slugs and set up 301 redirects from any alternate URL formats to the canonical one.
red-wine is indexed as two words: "red" and "wine". Underscores are treated as connectors — red_wine is indexed as a single word "red_wine". This means hyphens improve keyword matching in search. The only exception is if your technology stack has a specific requirement for underscores (for example, some Python frameworks use snake_case routing by convention).
About This Slug Converter
This free slug converter transforms any heading or title into a URL-friendly slug by converting to lowercase, replacing spaces with hyphens, and removing special characters. The output follows RFC 3986 URI conventions and handles accented characters (e.g. e-acute to e), punctuation removal, and consecutive-hyphen collapsing.
URL slugs that are clean, lowercase, and hyphen-separated are easier for search engines to read and understand, and more shareable for users.
When to use this tool
- Generating blog post or article URL slugs from their titles
- Creating clean file names from arbitrary descriptive strings
- Building URL-safe identifiers for CMS content or API routes
- Normalising slugs consistently across a site migration
Standards & References
How It Works
Type a Title
Type or paste any title, headline, or phrase. The slug updates in real time on every keystroke — no button press needed.
Normalize & Strip
Diacritics are decomposed (NFD) and stripped, & becomes and, non-alphanumeric characters are removed, and optional stop words are filtered out.
Copy the Slug
Paste the result directly into your CMS URL field. Choose hyphen or underscore separator, and toggle lowercase and stop-word removal.
Common Use Cases
Blog & CMS URL Slugs
Convert article titles to SEO-friendly URL slugs for WordPress, Ghost, Webflow, or any CMS. Clean, readable URLs improve both rankings and click-through rates.
File & Directory Names
Generate safe file names for assets, images, and documents. Slugified names avoid spaces and special characters that break file systems and URLs.
Database Keys & Identifiers
Create consistent identifiers for tags, categories, and taxonomy terms from human-readable labels, ensuring uniqueness by removing punctuation.
npm & Package Names
Generate valid lowercase package names for npm, Composer, or PyPI from descriptive titles, following the naming conventions of each registry.
CSS Class & ID Names
Turn a component name or section title into a valid, readable kebab-case class or ID. Consistent naming reduces CSS specificity conflicts.
Internationalized Content
Strip diacritics from accented characters in titles (café → cafe, naïve → naive) to generate ASCII-safe slugs for multilingual sites.
Related Text Tools
Related Articles
View all articles
Slug Collisions: What Happens When Two Pages Generate the Same URL, and How CMSs Handle It
Two posts titled "How to Make Sourdough Bread" generate identical slugs by default — and what happens next varies by CMS, from silent numeric suffixes (chocolate-chip-cookies-2) to outright rejection requiring manual resolution. Here's how different collision-handling approaches work, why date/ID-based URL structures avoid most collisions structurally, and the tricky edge case of new content colliding with an old slug's redirect.
International URL Slugs: Transliteration vs Native Characters for Non-Latin Scripts
Chinese, Arabic, and Cyrillic characters in URLs are technically valid and browsers display them readably — but transliteration vs native-language slugs involves real SEO and UX trade-offs. Here's how percent-encoding works, transliteration libraries for different languages, and how major frameworks handle non-ASCII slugs.
URL Design: Why Your Slug Is a Commitment — and How to Get It Right
A URL published today may need to work in 2034. Here's how Wikipedia, the BBC, and GOV.UK approach URL permanence and readability, the SEO costs of changing slugs, and the slug design principles that produce URLs worth keeping.
Text to Slug Converter — Generate Clean, SEO-Friendly URL Slugs Instantly
Learn what makes a valid URL slug, the transformation process from arbitrary text, whether to remove stop words, why hyphens beat underscores, and how to generate SEO-friendly slugs with a free text-to-slug converter.