Text To Slug
Turn a title into a bounded lowercase slug with explicit ASCII or Unicode rules, NFKD accent handling, and hyphen or underscore separators.
Privacy: your files never leave your device. All processing happens locally in your browser.
How to use
- 1.Enter the title or phrase to convert.
- 2.Choose hyphen or underscore, set the maximum length, and decide whether to keep non-Latin Unicode letters and numbers.
- 3.Create the slug, inspect its exact characters and length, then download the TXT result.
About Text To Slug
Text To Slug converts a title or phrase into a lowercase URL-style identifier with transparent character rules. Enter up to 100,000 UTF-16 code units, choose hyphens or underscores, set a maximum from one through 200 Unicode code points, and decide whether non-Latin letters and numbers should be retained. The generated value is previewed and can be downloaded as UTF-8 plain text. Processing happens locally in the browser.
The conversion first applies Unicode NFKD normalization. It then removes combining marks and converts letters to lowercase. Many accented Latin characters therefore reduce naturally: “Crème brûlée” becomes “creme-brulee” in ASCII mode. This behavior comes from the browser's Unicode normalization data rather than a hand-written transliteration dictionary.
ASCII mode retains only lowercase a through z and digits zero through nine after normalization. All other runs become one chosen separator. A letter that does not decompose to an ASCII base is removed as part of its surrounding separator run. If nothing remains, the tool returns an explicit error instead of an empty slug.
Unicode mode retains characters that the browser classifies as Unicode letters or numbers. Chinese, Arabic, Cyrillic, Greek, and other scripts can therefore remain in the slug without being converted to approximate Latin spellings. Combining marks are still removed under the same NFKD rule, and punctuation or symbols become separators.
The tool deliberately does not transliterate languages. It does not convert Chinese characters to Pinyin, Cyrillic to Latin, German sharp s to ss, or symbols such as ampersand to language words. Those mappings require language choices and reference tables that can be surprising. What is removed or preserved follows the selected mode and built-in Unicode properties.
Every consecutive run of spaces, punctuation, symbols, and disallowed characters becomes at most one separator. Leading and trailing separators are removed. Existing hyphens and underscores are treated like other boundary characters, so mixed separators are normalized to the selected output character.
Maximum length counts Unicode code points in the generated value. Truncation happens only after conversion and never cuts a UTF-16 surrogate pair. If the final retained portion ends with a separator, that separator is removed. The tool does not attempt to preserve a complete last word, because that could produce a value longer or much shorter than the exact stated ceiling.
Malformed UTF-16 with an isolated surrogate is rejected before normalization. This prevents the preview and UTF-8 Blob encoder from silently disagreeing through replacement characters. Ordinary text entered or pasted through a browser is normally well formed, but the validation keeps the transformation contract explicit.
Use generated slugs for draft URLs, filenames, anchors, CSS-like identifiers, note keys, and CMS planning. A slug does not reserve a URL or guarantee uniqueness. Two different titles can normalize to the same value, and truncation increases collision risk. The destination system should enforce uniqueness or append its own stable identifier.
Search engines can handle Unicode URLs, but browsers may display percent-encoded forms when copied between systems. ASCII mode is more portable across older tools; Unicode mode preserves language identity. Choose according to the actual CMS, router, analytics, and editorial policy rather than assuming one mode is universally better.
The tool does not check reserved routes, filesystem names, database constraints, case-insensitive collisions, or an existing site's URL inventory. It also does not add a domain, path slash, file extension, or percent encoding. The result is only the slug segment shown in the preview.
Download creates a temporary UTF-8 Blob URL at click time and revokes it immediately after the browser starts the transfer. Editing any field clears the old result. No title, output, history, account, dictionary, or network service participates in conversion, so accepted input and options produce a deterministic value under the browser's Unicode implementation.
Methodology & sources
Reject empty, malformed-Unicode, or over-100,000-code-unit input; validate a hyphen or underscore separator and a whole-number maximum from one through 200; normalize with NFKD, remove Unicode combining marks, lowercase, retain only ASCII a–z and digits or all Unicode letters and numbers according to the explicit mode, collapse every disallowed run to one separator, trim boundary separators, slice by Unicode code point to the maximum and trim a trailing separator again, reject an empty result, and create a short-lived UTF-8 Blob URL on download click.
Frequently asked questions
- Does this tool transliterate every language into Latin letters?
- No. It uses Unicode normalization but includes no language transliteration dictionary.
- Why can ASCII mode return no slug for some scripts?
- ASCII mode keeps only a–z and digits after normalization; choose Unicode mode to retain other letters and numbers.
- Does the slug automatically become unique?
- No. The destination CMS or database must check and enforce uniqueness.
- Is my title uploaded?
- No. Normalization, filtering, previewing, and download creation happen locally.
Related tools
- Case ConverterConvert text between UPPERCASE, Title Case, camelCase, snake_case and more — instantly in your browser.
- Character CounterCount characters in real time and instantly see how much room is left for X/Twitter, SMS, Instagram, and SEO meta tags.
- Text FormatterApply only selected line trimming, horizontal whitespace collapse, and blank-line limits while leaving words and punctuation untouched.
- Add Line Numbers to TextNumber every line of pasted text from a chosen starting value with a custom separator and optional zero padding.
- Add Prefix and Suffix to LinesAdd literal prefix and suffix text to every pasted line, with an option to leave blank lines untouched.
- APA Citation GeneratorBuild correctly formatted APA 7th edition references for websites, books, journals, and newspapers in seconds.
Text Tools guides
View all- Remove Emoji from Any Text Without Losing Formatting
- Yes, You Can Copy and Paste Emojis Anywhere in One Click
- How to Extract Email Addresses From Excel Cells
- Count Text Occurrences in Excel Without Formulas
- Count Characters in a String in Python (Plus Real-Time Counts)
- How to Change Case in an Excel Sheet Without Formulas
- Make LinkedIn Posts Stand Out with Bold Text
- Add a Prefix to All Lines in a File on Linux the Easy Way
- How Do I Add a Number to Text on Every Line
- How to Reverse Text Without Breaking Emojis
- How to Copy Special Characters with Unicode Names and Codes
- Count Lines in a File in Linux Without Command-Line Hassle
- Remove Line Break Symbols in Outlook Without Losing Formatting
- Extract Email Addresses from a Cell in Excel in One Click
- How to Generate Random Words in Excel
- How to Emoji Copy and Paste From Any Browser
- How to Generate Lorem Ipsum Online
- How to Create a Random List in Excel Without Formulas
- How to Use Kaomoji: Copy and Paste Japanese Emoticons
- Count Characters in a Cell in Excel and Beyond for Social Media