# Text to slug: what is kept, what is dropped

> How the slug converter treats accents, punctuation, separators and non-Latin scripts, with computed examples and the cases where the result is empty.

- Tool: [Text to Slug Converter](https://toolsg.com/en/text-to-slug)
- Language: en (available: en, zh, ms, ta)
- Last verified against official sources: 2026-10-20
- Source site: ToolSG — a planning guide, not official or financial advice. Cite the agencies listed under Sources.

## Key figures at a glance

| Fact | Value | Source |
| --- | --- | --- |
| Characters kept | a-z, A-Z, 0-9 and the separator — Everything else is removed after accents are stripped. |  |
| Separators | Hyphen or underscore — Any run of spaces, hyphens and underscores becomes one separator. |  |
| Accents | Stripped via Unicode NFD — Combining marks U+0300 to U+036F are deleted, so é becomes e; ß ø æ œ ł đ þ are written out as ss o ae oe l d th. |  |
| Non-Latin text | Removed, not transliterated — Chinese, Tamil and emoji disappear; a title made only of them gives an empty slug. |  |

## How the conversion works

The converter runs five steps in order, all in your browser:

1. Write out the Latin letters that cannot be decomposed (`ß` to `ss`, `ø` to `o`, `æ` to `ae`, `œ` to `oe`, `ł` to `l`, `đ` to `d`, `þ` to `th`), then decompose the text with Unicode NFD and delete the combining marks in the range U+0300 to U+036F. `é` is stored as `e` plus a combining acute accent, so the accent goes and the letter stays.
2. Trim leading and trailing whitespace.
3. Lowercase everything, if **lowercase** is ticked (it is by default).
4. Delete every character that is not an ASCII letter, a digit, whitespace, a hyphen or an underscore.
5. Replace each run of whitespace, hyphens and underscores with one separator (hyphen or underscore, your choice), then remove separators at the start and end.

Because step 4 only keeps ASCII letters and digits, the output is always safe to put in a URL path without percent-encoding. Hyphen and underscore are both in the RFC 3986 "unreserved" set.

## Worked examples

All results below were produced by the page's own code.

| Input | Options | Slug |
| --- | --- | --- |
| `  Café Crème: 10 Tips & Tricks! ` | default | `cafe-creme-10-tips-tricks` |
| `Hello, World_ foo--bar` | underscore | `hello_world_foo_bar` |
| `Hello World` | lowercase off | `Hello-World` |
| `Naïve façade — it's 50% off` | default | `naive-facade-its-50-off` |
| `Straße Øre Æble Łódź` | default | `strasse-ore-aeble-lodz` |
| `Smørrebrød & Œuvre, Đà Nẵng, Þór` | default | `smorrebrod-oeuvre-da-nang-thor` |
| `你好 World 🙂 தமிழ்` | default | `world` |

Note the apostrophe in `it's` is deleted rather than turned into a separator, and the em dash disappears because it is neither a letter nor a hyphen.

## Limits you should know about

- **Only a fixed list of special Latin letters is written out.** `ß`, `ø`, `æ`, `œ`, `ł`, `đ` and `þ` become `ss`, `o`, `ae`, `oe`, `l`, `d` and `th`, so `Straße` becomes `strasse`. Other letters without an NFD decomposition, such as `ð` or the dotless `ı`, are still dropped; fix such words by hand before converting.
- **No transliteration of other scripts.** Chinese, Tamil, Arabic and emoji are removed. A title written only in those scripts gives an empty slug. For those pages use an ID, a pinyin or romanised phrase typed by you, or a percent-encoded Unicode path if your site supports it.
- **No length limit and no stop-word removal.** Long titles give long slugs; shorten them yourself.
- **Numbers stay.** `10 Tips` keeps the `10`.

## Hyphen or underscore

Google's URL guidance recommends hyphens to separate words, and treats `/APPLE` and `/apple` as different URLs, which is why lowercase is the default. Underscores are fine for file names, database keys and identifiers. Turn lowercase off only when the destination is case-sensitive and expects capitals.

> **Tip:** Once a URL is published, changing its slug breaks existing links unless you add a redirect. Decide the slug before you publish.

## Common mistakes

- Assuming every special Latin letter is converted. Only `ß ø æ œ ł đ þ` and accented letters are; letters such as `ð` or `ı` disappear.
- Pasting a Chinese or Tamil headline and getting nothing back.
- Assuming the slug is unique. Two titles can produce the same slug; check your site for duplicates.
- Mixing both separators in one project. Pick one convention.

## Related tools

[Case converter](https://toolsg.com/en/case-converter) offers `kebab-case` and `snake_case` for text that is already ASCII and keeps punctuation. [HTML entity encoder](https://toolsg.com/en/html-entity-encoder) and [Base64](https://toolsg.com/en/base64-encoder) are for encoding, not for making readable URL parts. [Hidden character cleaner](https://toolsg.com/en/hidden-character-cleaner) removes invisible characters that slip into pasted titles.

## Frequently asked questions

**Is my text sent to a server?**

No. Everything runs in your browser using JavaScript. Nothing you type or paste is uploaded, logged or stored anywhere.

**Is there a length limit?**

There is no fixed limit — the practical ceiling is your browser's memory. Documents of tens of thousands of words are handled comfortably.

**Does it handle non-English text?**

Partly. Accented Latin letters become plain letters ("café" becomes "cafe"), and ß, ø, æ, œ, ł, đ and þ are written out as ss, o, ae, oe, l, d and th. Chinese, Tamil, other non-Latin scripts and emoji are not transliterated: they are dropped, so a title written only in them gives an empty slug. Add a Latin transliteration (such as pinyin) yourself if you need those words in the URL.

**Does it change my original text?**

No. Your input stays exactly as you typed it; the result is produced separately so you can adjust the options and compare.


## Sources

- [Google Search Central — URL structure best practices](https://developers.google.com/search/docs/crawling-indexing/url-structure) — Recommends hyphens over underscores and warns that URLs are case-sensitive.
- [RFC 3986 — URI unreserved characters](https://www.rfc-editor.org/rfc/rfc3986#section-2.3)
- [Unicode UAX #15 — Normalization forms](https://unicode.org/reports/tr15/)
