A text to slug example shows how a title becomes a lowercase URL-style identifier under explicit ASCII or Unicode rules, with a maximum output length of 1–200 Unicode code points. The Text To Slug tool applies Unicode NFKD normalization first, removes combining marks, lowercases the result, and then filters characters according to the mode you select. In ASCII mode, only a–z and 0–9 survive; in Unicode mode, Unicode letters and numbers survive, so scripts such as Chinese, Arabic, Cyrillic, and Greek can remain intact. Spaces, punctuation, symbols, and other disallowed runs collapse to a single hyphen or underscore, and boundary separators are removed. A familiar example is “Crème brûlée,” which becomes “creme-brulee” in ASCII mode because NFKD decomposes the accented letters; this is normalization, not language-specific transliteration. The tool accepts up to 100,000 UTF-16 code units of input and previews the exact generated value before you download it as UTF-8 plain text. All processing happens locally in your browser, so the title and generated slug are not uploaded.

A Basic Text to Slug Example
Start with “Crème brûlée.” With ASCII mode and a hyphen selected, the preview is creme-brulee. NFKD decomposes the accented vowels into base letters plus combining marks; the tool removes those marks, lowercases the letters, and leaves one hyphen for the space. The transformation is based on the browser’s Unicode normalization data, not a hand-written French dictionary.
Mode choice can change whether any useful slug survives. In Unicode mode, the title “中文标题” remains 中文标题, because the browser classifies those characters as Unicode letters. In ASCII mode, those characters are not eligible, so the converted text is empty and the tool returns an explicit error instead of an empty slug.
Separator handling is equally predictable. Every consecutive run of spaces, punctuation, symbols, or disallowed characters becomes one chosen separator. Existing hyphens and underscores count as boundary characters, so a mixed input such as “draft-title_final” becomes “draft_title_final” when underscore is selected. Leading and trailing separators are removed.
Choosing the Right Character Mode
The selected mode determines what remains after normalization. It controls character eligibility rather than detecting a language or choosing a transliteration system.
| Decision | ASCII mode | Unicode mode |
|---|---|---|
| Eligible characters | Lowercase a–z and digits 0–9 | Unicode letters and numbers |
| Accented Latin | NFKD removes combining marks, so many characters reduce to base ASCII | Combining marks are removed while remaining Unicode letters stay eligible |
| Chinese, Arabic, Cyrillic, and Greek | Removed as disallowed characters | Can remain without an approximate Latin spelling |
| Punctuation and symbols | Collapsed into the selected separator | Collapsed into the selected separator |
| Transliteration | None | None |
| No eligible output | Returns an explicit error | Returns an explicit error |
ASCII mode is more portable across older tools that expect a restricted character set. Unicode mode preserves language identity for modern systems. Search engines can handle Unicode URLs, but browsers may display percent-encoded forms when they are copied between systems. Choose based on the actual CMS, router, analytics, and editorial policy rather than assuming one mode is always preferable.
Creating a Slug in Four Clear Actions
- Enter a non-empty title or phrase to convert. The input may contain up to 100,000 UTF-16 code units.
- Choose hyphen or underscore as the separator, set the maximum length to a whole number from one through 200 Unicode code points, and decide whether to keep non-Latin Unicode letters and numbers.
- Create the slug. The preview shows the generated value and its length.
- Inspect the exact characters and length in the preview, then download the result as a UTF-8 plain-text TXT file.
Editing an input or option clears the previous result, so create the slug again after making a change. No title or output is uploaded, and no history, account, dictionary, or network service participates in the conversion. Given the same accepted input, options, and browser Unicode implementation, the result is deterministic. At download time, the tool creates a temporary UTF-8 Blob URL and revokes it immediately after the browser starts the transfer.
How NFKD Handles Accents Without Transliteration
The order of operations explains most surprising examples. MDN’s String.normalize documentation describes Unicode normalization forms, while Unicode Standard Annex #15 defines the underlying normalization behavior. Text To Slug uses NFKD before filtering. The first pass decomposes characters where Unicode defines a decomposition, combining marks are then removed, and lowercase conversion follows. Only after those steps does ASCII mode retain a–z and 0–9, while Unicode mode retains characters the browser classifies as Unicode letters or numbers.
This design deliberately stops short of transliteration. The tool does not turn Chinese into Pinyin, Cyrillic into Latin, ß into ss, or an ampersand into the word “and.” An ampersand is a symbol, so it becomes part of a separator run. In Unicode mode, Chinese, Arabic, Cyrillic, and Greek letters can remain while punctuation and symbols still become separators. Combining marks are removed under the same rule in both modes. This provides transparent character handling without a hidden dictionary whose language choices might surprise an editor.
Setting an Exact Maximum Length
The input and output ceilings measure different things. The source can contain up to 100,000 UTF-16 code units, but the generated slug’s maximum is a whole number from one through 200 Unicode code points. The maximum applies to the finished value after normalization, filtering, separator collapsing, and boundary trimming. Code points are counted rather than raw storage units, and truncation is designed not to cut a UTF-16 surrogate pair in half.
Truncation does not attempt to preserve the last complete word. It keeps the allowed portion up to the selected ceiling; if the retained portion ends in a separator, that separator is removed. Backing up to an earlier word boundary could produce a value much shorter than the stated maximum, so the tool prioritizes the exact ceiling instead. This makes the result predictable, but it also means a slug can end mid-word. Two different titles can normalize to the same value, and shorter ceilings increase that collision risk.
Two invalid conditions are explicit. If filtering leaves nothing, the preview returns an error rather than an empty slug. If pasted data contains malformed UTF-16 with an isolated surrogate, the input is rejected before normalization so the preview and UTF-8 encoder cannot silently disagree through replacement characters. Ordinary text typed or pasted in a browser is normally well formed, but the validation keeps the transformation contract explicit.
Using the Slug in a Real Content Workflow
A generated slug is useful as one identifier segment in a larger publishing system. Appropriate uses include draft URL paths, filenames, anchors, CSS-like identifiers, note keys, and CMS planning. In each case, preview the value in the context where it will be used and apply the destination system’s own constraints afterward.
The output is only the slug segment shown in the preview. It does not add a domain, path slash, file extension, or percent encoding. It also does not reserve a URL or guarantee uniqueness. The tool does not inspect reserved routes, filesystem names, database constraints, case-insensitive collisions, or an existing site’s URL inventory. Your CMS, router, or filesystem must enforce those conditions, possibly by appending a stable identifier after checking the candidate.
Choose the character mode for the actual CMS, router, analytics, and editorial policy. ASCII mode is more portable across older tools, while Unicode mode preserves language identity. Search engines can handle Unicode URLs, although a browser may display a percent-encoded form when the URL is copied between systems. Neither mode is universally better. Once the preview matches the intended segment, download the UTF-8 TXT result and let the destination system handle routing and uniqueness.