Text to Slug Converter
Text ToolsConvert titles to URL-friendly slugs — SEO-ready, handles Unicode and accents. Free, private — all processing in your browser.
Type a title and get a clean URL slug: lowercase, spaces turned into hyphens, punctuation removed, accents flattened. "My Blog Post Title! (2024)" becomes "my-blog-post-title-2024". It updates live and shows a preview of how the slug looks in a real URL, so you can see the result in context.
Slugs are the human-readable part of a URL — the /my-blog-post-title bit. A good slug is short, lowercase, and uses hyphens between words, because that's what's readable, portable across systems, and friendly to both people and search engines. This tool handles the fiddly parts: stripping characters that don't belong in URLs, collapsing repeated separators, and trimming stray separators from the ends.
You can switch the separator (hyphen, underscore, dot, or none), toggle lowercasing, turn accent removal on or off, and cap the length so long titles don't produce absurdly long slugs. The click-to-try examples show how it handles messy real-world titles.
What the Text to Slug Converter can do
Unicode transliteration
Handles accented Latin, Cyrillic, Greek, Arabic, CJK. Converts to ASCII slug.
Custom separator
Hyphen (default, SEO-preferred), underscore, or custom character.
Case options
Lowercase (default), uppercase, or preserve original case.
Diacritic stripping
Automatically strips accents (é → e, ñ → n). Preserves meaning while making ASCII-safe.
Length limits
Truncate long slugs at word boundaries. Configurable max length (default 80 chars).
Character whitelist
Specify additional characters to preserve. Useful for language-specific needs.
Batch conversion
Paste multiple titles, one per line. Get slugs for all at once.
Preview live
Slug updates as you type. See the result instantly.
Using the Text to Slug Converter
- 1
Paste title or text
Article title, blog post heading, file name, any text to slugify.
- 2
Choose separator
Hyphen (-) for URLs (SEO standard). Underscore (_) for SQL or filenames.
- 3
Set options
Transliterate non-Latin? Strip accents? Preserve case? Max length?
- 4
Copy the slug
Resulting slug is ready to use in your URL, file name, database column, or API identifier.
Common use cases for the Text to Slug Converter
Content management
- →Blog post URLs: Convert blog titles to permalinks. 10 Best JavaScript Libraries 2026 → /blog/10-best-javascript-libraries-2026.
- →WordPress / Ghost / Medium: These CMSs generate slugs automatically but sometimes produce bad results. Override with a clean manual slug.
- →E-commerce product URLs: Product titles to clean URLs. Wireless Noise-Cancelling Headphones Pro X → /products/wireless-noise-cancelling-headphones-pro-x.
- →Category and tag URLs: Category names to slugs: Web Development, Tutorials → /categories/web-development-tutorials.
Developers
- →Database primary keys: Human-readable ID columns in URLs (instead of UUID). Pair with incrementing integer for uniqueness.
- →File naming: Upload user-provided file names safely. cv final v3 (real).pdf → cv-final-v3-real.pdf.
- →Cache keys: Predictable, human-readable cache keys.
- →Kubernetes resource names: K8s resource names must be lowercase, hyphen-separated, under 63 chars. Slugify matches.
SEO
- →Keyword-rich URLs: URLs with keywords rank slightly better. /how-to-learn-python-in-2026 beats /post/12345.
- →Memorable, shareable URLs: Clean slugs are easier to remember and share verbally.
- →Meaningful URL structure: Site hierarchy visible in URLs: /category/subcategory/post-title.
International sites
- →Multilingual content: Each language version has its own slug. Transliterate for readability in URLs.
- →Non-Latin URLs: Option to preserve Unicode in URLs (modern browsers support IDN). Some markets prefer native-script URLs.
- →ASCII-safe for global users: Transliterate to ASCII for maximum compatibility — URLs work everywhere.
Worked examples
Simple blog title
English title with spaces.
10 Best JavaScript Libraries for 2026
10-best-javascript-libraries-for-2026
Accented characters
French text with accents.
Où acheter le meilleur café à Paris
ou-acheter-le-meilleur-cafe-a-paris
Special characters removed
Punctuation stripped.
What's New in JavaScript? (ES2026 Features!)
whats-new-in-javascript-es2026-features
Cyrillic transliteration
Russian text to ASCII.
Путеводитель по Москве
putevoditel-po-moskve
Chinese transliteration
Using Pinyin.
北京旅游指南
beijing-lvyou-zhinan
Length limit
Truncate long titles.
A Very Very Very Very Long Blog Post Title That Goes on and on and on and Never Ends Max length: 50
a-very-very-very-very-long-blog-post-title-that
Underscore separator
For SQL column or legacy system.
user_first_name style Input: User First Name
user_first_name
Emoji and special
Removed entirely.
🚀 Launch Day 2026! 🎉
launch-day-2026
How it works
Accent removal uses Unicode NFD normalization: it decomposes accented letters into a base letter plus a combining mark, then strips the combining marks, so café becomes cafe and naïve becomes naive. After that, everything except letters, numbers, spaces, and the separator is removed, whitespace runs collapse to a single separator, repeated separators are merged, and leading/trailing separators are trimmed. If you set a max length, the slug is cut to that length and any separator left dangling at the cut is removed.
The important limitation: this only keeps A–Z, 0–9. NFD normalization handles Latin diacritics, but characters from non-Latin scripts — Cyrillic, Greek, Arabic, Chinese, Japanese, Korean — have no base ASCII letter to fall back to, so they're stripped entirely rather than transliterated. A title written in those scripts can produce an empty or number-only slug. Everything runs in your browser as you type.
Troubleshooting
⚠Non-Latin scripts are stripped, not transliterated
Accent removal only works for Latin letters. Cyrillic, Greek, Arabic, and CJK characters have no ASCII base to reduce to, so they're removed entirely — a title in those scripts may produce an empty slug.
⚠Only A-Z and 0-9 survive
Every character outside letters, numbers, spaces, and the separator is dropped. Symbols like &, #, and @ don't become words (& won't turn into 'and') — they're simply removed.
⚠Cutting by length can split a word
A max length cuts at a character count, not a word boundary, so a word can be truncated mid-way. The tool removes a trailing separator after the cut, but the last word may still be partial.
⚠Slugs should be unique
This generates a slug from text but can't know if that slug already exists on your site. Two similar titles can produce the same slug — your CMS still needs to enforce uniqueness (often by appending a number).
⚠Changing a live slug breaks links
If you regenerate a slug for a page that's already published and linked, the old URL will 404 unless you set up a redirect. Decide the slug before publishing where you can.
How it compares
Most slug generators do the same core job. Where this one is careful is the edge handling: collapsing duplicate separators, trimming ends, and cleaning up after a length cut, so you don't get slugs like my--post- with trailing junk. The live URL preview and adjustable separator/length also make it quick to match whatever convention your CMS or router uses.
If your content is in a non-Latin script and you need real transliteration (turning Москва into moskva or 東京 into tokyo), this won't do it — those need a language-specific transliteration library. For Latin-script titles, which is the common case, this covers it.
Text to Slug Converter — FAQ
▶What is a URL slug?
The readable part of a URL that identifies a page, like 'my-blog-post' in example.com/blog/my-blog-post. Good slugs are lowercase, hyphen-separated, short, and free of special characters.
▶Should I use hyphens or underscores in a slug?
Hyphens. Search engines treat hyphens as word separators, so 'my-blog-post' reads as three words, while 'my_blog_post' can read as one. This tool defaults to hyphens but lets you switch.
▶How are accented characters handled?
With 'Remove accents' on, Latin diacritics are flattened: café becomes cafe, résumé becomes resume. This uses Unicode NFD normalization and works for Latin-script letters, not for non-Latin alphabets.
▶Why is my slug empty?
Because the input contained only characters that get stripped — punctuation, symbols, or non-Latin script. The tool keeps only letters, numbers, and separators, so text with none of those produces nothing.
▶Does it transliterate other languages?
No. It removes Latin accents but doesn't convert non-Latin scripts (Cyrillic, Chinese, Arabic, etc.) into Latin letters. For that, you'd need a dedicated transliteration library for the specific language.
Additional resources
- RFC 3986 — URI Syntax — Unreserved characters that are URL-safe.
- Google SEO URL Guide — Google recommendations for URL structure.
- slugify (npm) — Popular Node.js slugify library.
- URL Slugs SEO Guide (Tooleras blog) — Our SEO-focused slug tutorial.
- Punycode (IDN) — Encoding used for international domain names.
Related tools
All Text ToolsCase Converter
Convert between upper, lower, title, camel, snake, kebab, Pascal, CONSTANT cases
Find and Replace
Find and replace text with regex support, case sensitivity, whole-word matching, and preview of all changes before applying.
Meta Tag Generator
Generate SEO meta tags, Open Graph, Twitter Cards, and canonical tags
Punycode Converter
Encode internationalized domain names to Punycode and decode xn-- prefixed ASCII back to Unicode so non-Latin domains work in DNS, email, and the web.
Random String Generator
Generate random strings with configurable length, character sets, and patterns for tokens, IDs, passwords, and test data.
Remove Duplicate Lines
Remove duplicate lines from text with case-sensitive or case-insensitive matching, preserving original order or sorting the result.
Learn more
Explore more tools
200+ free tools that run in your browser.
Browse all tools →