🔤 Unicode Normalizer & Accent Remover
Normalize text to a canonical Unicode form (NFC, NFD, NFKC or NFKD), or strip accents and diacritics so “café” becomes “cafe”.
How the unicode normalizer & accent remover works
Unicode normalization brings text to a canonical form so that visually identical strings compare equal. NFC composes characters (e + ´ → é); NFD decomposes them; the NFK forms additionally fold compatibility characters (the fi ligature → fi, ² → 2). With accent-stripping on, the text is decomposed and its combining marks removed, turning accented letters into their base letters. The four forms pair a composition choice with a strictness choice: NFC and NFD keep canonical equivalence (the text still means the same), while NFKC and NFKD additionally apply compatibility mappings that can change appearance, such as folding a ligature or a superscript into plain characters.
Pure algorithm via the browser’s built-in Unicode data, never rots. Essential for search, deduplication and creating ASCII-safe identifiers from accented text.
Frequently asked questions
What is Unicode normalization?
A process that converts text to a standard form so that strings which look the same are stored the same way. “é” can be one code point or an “e” plus a combining accent, normalization makes them consistent so they compare and search correctly.
What is the difference between NFC and NFD?
NFC composes characters into single code points (é as U+00E9); NFD decomposes them (e + combining acute). NFC is the common storage form; NFD is useful for stripping accents.
What do NFKC and NFKD do differently?
They also fold “compatibility” characters, turning ligatures like fi into “fi”, full-width letters into normal ones, and ² into 2. Use them to simplify text, but note they change some characters’ meaning.
How does accent removal work?
The text is decomposed (NFD) and the combining marks are removed, so “café” becomes “cafe” and “naïve” becomes “naive”. Handy for URLs, IDs and ASCII-only systems.
Which form should I use for storing or comparing text?
NFC is the usual choice for storage and web content. It is compact and what most systems expect. Use NFD or accent-stripping when you need to compare or search while ignoring diacritics.
Does stripping accents affect non-Latin scripts?
It removes combining marks, so accented Latin letters lose their accents. Characters with no base-letter decomposition are left readable rather than emptied, so essential marks in other scripts survive.
Why do two identical-looking strings not match in my database?
One is likely stored as a composed character (é as U+00E9) and the other as a base letter plus a combining accent. Normalising both to NFC collapses them to the same code points, so they compare and de-duplicate correctly.
Is NFKC safe to use for everything?
Not always. It folds compatibility characters, so ² becomes 2 and the fi ligature becomes fi, which changes meaning in maths or exact text. Use NFC to preserve appearance and reserve the NFK forms for search keys and simplification.
Is my text uploaded?
No, normalization uses your browser’s built-in Unicode support and runs locally.