Text to Slug Converter
Turn any headline into a clean, URL-safe slug.
Everything runs in your browser. Nothing you type is uploaded or stored.
In-depth guide
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.
Key figures at a glance
- 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:
- Write out the Latin letters that cannot be decomposed (
ßtoss,øtoo,ætoae,œtooe,łtol,đtod,þtoth), then decompose the text with Unicode NFD and delete the combining marks in the range U+0300 to U+036F.éis stored aseplus a combining acute accent, so the accent goes and the letter stays. - Trim leading and trailing whitespace.
- Lowercase everything, if lowercase is ticked (it is by default).
- Delete every character that is not an ASCII letter, a digit, whitespace, a hyphen or an underscore.
- 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þbecomess,o,ae,oe,l,dandth, soStraßebecomesstrasse. 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 Tipskeeps the10.
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 offers kebab-case and snake_case for text that is already ASCII and keeps punctuation. HTML entity encoder and Base64 are for encoding, not for making readable URL parts. 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 — Recommends hyphens over underscores and warns that URLs are case-sensitive.
- RFC 3986 — URI unreserved characters
- Unicode UAX #15 — Normalization forms
This guide explains published rules in plain language. It is not financial, legal or official advice — rules change, so confirm with the agency linked above before you commit.