Text & Writing

Text to Slug Converter

Turn a title into a plain path segment for a draft URL, filename convention, or content record. Choose ASCII filtering or retain Unicode letters, set a maximum length, and inspect the percent-encoded form before using it in a URL.

Free online tool

Loading tool…

0 grapheme clusters. Within the selected length.

Maximum input: 20,000 UTF-16 code units. Unicode normalization removes many Latin accents in ASCII mode, but this is not a transliterator. Chinese, Cyrillic, and letters such as ß and ø are removed in ASCII mode. No uniqueness, availability, or search ranking check is performed. Processing stays in this browser; text is not submitted to a server.

Text is processed locally in your browser. No tool input is sent to a remote processing service.

GET STARTED

How to use the Text to Slug Converter

  1. 01

    Paste a title or phrase.

  2. 02

    Choose hyphens or underscores and whether to keep Unicode letters.

  3. 03

    Set a maximum length from 1 to 200 grapheme clusters and decide how to handle ampersands.

  4. 04

    Copy the readable slug or its percent-encoded path-segment form. Check uniqueness in your own system.

Examples

A title with accents and punctuation

With the defaults, “Café Notes: Summer & Sunshine!” becomes cafe-notes-summer-and-sunshine. Punctuation separates words and an ampersand expands to and.

Retain a non-Latin title

For a title such as “東京 Travel Notes”, Unicode mode preserves 東京, while ASCII mode removes it. Neither mode translates the phrase into another language.

Apostrophes join the remaining letters

“Writer’s notebook” becomes writers-notebook. Apostrophes are removed rather than converted to a word separator.

The transformation order matters

The converter applies compatibility decomposition and English lowercasing, optionally expands an ampersand to and, and removes straight and curly apostrophes. In ASCII mode it also removes combining marks and replaces runs of non-ASCII letters or digits with the chosen separator. Unicode mode retains letters, marks, and numbers. Edge separators are removed and the result is normalized to NFC before the length limit is applied. Repeated punctuation therefore produces one separator rather than a series of empty words.

Accent removal is not transliteration

Decomposition makes many accented Latin letters usable in an ASCII slug after their combining marks are removed. It does not provide a complete spelling conversion for every alphabet. Characters such as ß and ø, as well as Chinese and Cyrillic letters, are removed in ASCII mode rather than translated. Select Unicode mode when retaining the original script is more useful than an ASCII-only result. Inspect the preview because stripping unsupported characters can remove important distinctions.

Readable versus percent-encoded output

The readable slug is convenient for editing and reviewing. The second output encodes it as a single URL path segment using encodeURIComponent, which expresses non-ASCII characters through percent-encoded UTF-8 bytes. It is not a complete URL and contains no domain or leading slash. Use the representation expected by your router, CMS, or API, and avoid encoding an already encoded slug a second time.

Length limits and collisions

The limit counts grapheme clusters in the readable slug, including separators. It cuts at that boundary and removes any separator left at the end, so it can shorten the final word. The encoded form may be much longer in characters or bytes. Different titles can produce the same slug after filtering, case conversion, or truncation. Check for collisions and reserved path names in the destination system; this tool does not query a website or reserve a URL.

What to know

  • Maximum input: 20,000 UTF-16 code units; output length setting: 1–200 grapheme clusters. Requires Intl.Segmenter.
  • No transliteration dictionary, route reservation, collision detection, or search performance analysis.

Common questions

Will this improve search rankings?

No ranking check or claim is made. This tool formats text. Choose a clear slug appropriate to the content and verify it in your publishing system.

Why did my phrase produce an empty slug?

ASCII mode can remove every character in a non-Latin phrase, and punctuation-only text also leaves nothing. Try Unicode mode or enter a meaningful supported title.

Does the length limit count encoded bytes?

No. It counts grapheme clusters in the readable slug. Percent encoding can expand one visible character into many characters in the encoded output.

Sources & references