🔤 Diacritics Remover
Paste accented text to strip diacritical marks — café becomes cafe, naïve becomes naive. Useful for generating slugs, filenames or ASCII-safe identifiers.
How the marks come off
The text is first decomposed, which splits every precomposed accented letter into a plain base letter followed by its mark or marks. Everything in the combining diacritical marks block is then deleted:
text.normalize('NFD').replace(/[U+0300-U+036F]/g, '')
"é" -> "e" + U+0301 -> "e"
The sample line "Café naïve résumé Zürich São Paulo El Niño" comes back as "Cafe naive resume Zurich Sao Paulo El Nino". Nothing else is touched: capitals stay capital, spaces and punctuation stay put, and the character count only drops by the number of marks removed. Vietnamese, which stacks two marks on one vowel, loses both at once.
The letters it cannot strip
A letter only loses its mark if Unicode considers it a base plus a mark. Letters that are their own thing have no decomposition and pass through untouched:
| Input | Output |
|---|---|
| Zürich | Zurich |
| Đà Nẵng | Đa Nang |
| Łódź | Łodz |
| Søren straße | Søren straße |
Ø, Đ, Ł, ß, Æ and Œ all survive, so if you are building a slug you still need to replace them yourself - conventionally o, d, l, ss, ae and oe.
Frequently asked questions
How do I remove accents from text for a URL slug?
Paste the text, copy the stripped version, then lower-case it and swap spaces for hyphens. Check the result for the handful of letters that have no accent to remove, such as the o-slash and the sharp s, because those stay as they are.
Why is the o with a stroke still in my text?
Because it is a letter in its own right rather than an o wearing a mark, so there is nothing to peel off. The same is true of the l with stroke, the d with stroke, the sharp s and the ae ligature. Replace those by hand.
Does removing diacritics change what a word means?
Often, yes. In Spanish ano and the n-tilde spelling are different words, and in Vietnamese the marks carry the tone, so stripped text is for machines - slugs, filenames, sort keys - not for anything a reader is meant to read.