Unicode Normalizer: NFC, NFKC, Fancy Text and Homoglyphs
Normalise text to NFC, NFD, NFKC or NFKD with a per-character code point view, turn fancy letters and numbers back into plain ASCII, and spoof, unspoof or detect Cyrillic and Greek homoglyphs. Nothing is uploaded.
0 characters, 0 bytes
0 characters, 0 bytes
About the Unicode normalizer
This tool normalises Unicode text, turns fancy letters and numbers back into plain ones, and swaps letters for homoglyphs and back, in your browser. The same visible text can be stored as different code points: é can be one precomposed character or an e followed by a combining accent, and 𝐇𝐞𝐥𝐥𝐨 in bold mathematical letters looks like a word but will not match a search for "Hello". The operations here make such text comparable again. Nothing is uploaded; your text is processed on this page and never leaves your device.
Operations
Normalize text
Choose one of the four normalisation forms of Unicode Standard Annex #15. NFC composes characters into their precomposed forms and is the form the W3C recommends for web content. NFD decomposes them into base letters and combining marks. NFKC and NFKD also apply compatibility mappings, so ligatures such as fi become fi, fullwidth A becomes A and superscript ² becomes 2. A table under the output lists every character with its code points before and after, and highlights those that changed.
Fancy letters and numbers
Fancy letters to plain turns bold, italic, script, Fraktur, double-struck, monospace, fullwidth, circled, parenthesised, small-capital and superscript letters back into ASCII letters, the styles produced by "fancy font" generators for social media bios. NFKC handles most of them; an in-house map covers the ones it misses, such as small capitals ᴀʙᴄ, negative circled and squared letters and regional indicator letters. Fancy numbers to plain digits turns digits of any script (Arabic-Indic ٣, Devanagari ३, Thai ๓), fullwidth, circled, parenthesised, superscript and subscript digits and Roman numeral characters into ASCII digits: Ⅻ becomes 12. Other text is left alone.
Homoglyphs
Spoof with homoglyphs replaces Latin letters with Cyrillic or Greek letters that look the same, at a rate from 0 to 100 per cent, to produce test data for spam filters and spoofing detectors. Unspoof homoglyphs maps those letters back to Latin. Check for spoofing lists every word that mixes scripts or consists only of look-alikes, with each suspicious letter, its script and its code point.
When normalisation matters
Two strings that look identical can compare as different when one is NFC and the other NFD, which breaks search, de-duplication, password checks and file names copied between systems. Normalise both sides to the same form before comparing them. Prefer NFC for storage; use NFKC only when you deliberately want to fold styled and compatibility characters, because it loses information such as superscripts.
Related tools
To see the bytes of normalised text, use Text to Binary. The Text Case Converter changes letter case after you have folded fancy letters, and the HTML Encoder and Decoder shows the numeric entities of each character.
Open-source credits
- The normalizer is implemented in-house for this site and uses no third-party library.
- Normalisation follows Unicode Standard Annex #15 (Unicode Normalization Forms) through the browser's built-in
String.prototype.normalize, and characters are grouped for the table by the grapheme clusters of UAX #29 throughIntl.Segmenter. - The homoglyph check follows the idea of Unicode Technical Standard #39 (Unicode Security Mechanisms), its mixed-script and confusable detection. The look-alike table is a curated subset of common Latin, Cyrillic and Greek confusables, not the full TR39 confusables data.
Frequently asked questions
What is the difference between NFC, NFD, NFKC and NFKD?
NFD splits characters into a base letter and combining marks, and NFC recombines them into precomposed characters where they exist. The K forms add compatibility folding on top, replacing ligatures, fullwidth forms, superscripts and styled letters with their plain equivalents, which makes text easier to match but loses formatting meaning.
Which normalisation form should I store text in?
NFC is the usual choice for storage and interchange, and it is what the W3C recommends for the web, because it is compact and keeps every distinction the author made. Use NFKC for search keys or user names, where styled and compatibility variants should count as the same text.
Why does NFKC not turn every fancy letter back into plain text?
Only characters with a compatibility decomposition in the Unicode data are folded by NFKC. Small capitals, negative circled and squared letters and regional indicators have none, and parenthesised letters fold to a letter wrapped in brackets, so the fancy letters operation maps those with its own table before applying NFKC.
What is a homoglyph attack?
It is a trick that swaps letters for look-alikes from another script, for example a Cyrillic а for a Latin a, so a fake domain, account name or brand reads like the genuine one. Browsers, mail clients and registrars defend against it by flagging names that mix scripts, which is the check this tool performs on each word.
Can unspoofing damage genuine Cyrillic or Greek text?
Yes. Unspoofing replaces every letter found in the look-alike table, so a real Russian or Greek word made of such letters is rewritten in Latin letters too. Run it only on text that should be Latin, and use the spoofing check first when you are not sure which words were tampered with.