Skip to content

Unicode Text Normalizer

Paste text that looks right but will not match, search or sort, and convert it to a Unicode normalization form: NFC, NFD, NFKC or NFKD. You can also narrow full-width characters and expand ligatures such as fi on their own, and a table shows exactly which code points changed and how many UTF-8 bytes they cost. It runs in your browser and nothing is uploaded.

Runs entirely in your browser. Your text and any file you open are never uploaded.

Normalization form

Canonical composition: é is one code point. The form the web and most software expect. Keeps compatibility characters such as fi, ² and ™.

Also, before normalizing

Paste some text or load a sample to normalize it.

How to Use the Unicode Text Normalizer

  1. Paste the text. Use a sample, a file or your own text. The tool first tells you which of the four forms the text is already in.
  2. Choose a form. NFC is the safe default. Choose NFKC when you want look-alike characters folded together for searching or matching. Choose None to apply only the options below.
  3. Add the extras if you need them. Full-width to half-width turns A1! into A1! and the ideographic space into an ordinary space. Expand ligatures turns fi into fi. Both work with any form, including NFC, which leaves them alone.
  4. Read the report. The counts show code points, UTF-16 units and UTF-8 bytes before and after, and the table lists each kind of change with its code points. Copy the result or download it.

The Four Normalization Forms

Unicode often has more than one way to write the same thing. The letter é can be one code point, U+00E9, or an e followed by a combining acute accent, U+0065 U+0301. The two are canonically equivalent: they mean the same and should look the same, but a program comparing the raw code points sees different strings. Normalization, defined in Unicode Standard Annex #15, picks one representation so equal text compares equal.

FormHow it is builtEffect on é, fi and ²
NFDCanonical decompositioné becomes e + accent; fi and ² stay
NFCCanonical decomposition, then canonical compositione + accent becomes é; fi and ² stay
NFKDCompatibility decompositioné becomes e + accent; fi becomes fi; ² becomes 2
NFKCCompatibility decomposition, then canonical compositione + accent becomes é; fi becomes fi; ² becomes 2

The K forms add compatibility equivalence. A compatibility character is one that duplicates another character with extra formatting or shape: a ligature, a superscript, a circled digit, a full-width letter, a half-width katakana. Folding them helps search and matching, but it throws information away. x² becomes x2, and ™ becomes TM, so do not use NFKC on text you mean to publish unchanged.

What Each Form Does to Real Characters

TextCode pointsNFC givesNFKC gives
é typed as two charactersU+0065 U+0301é, U+00E9é, U+00E9
Ω ohm signU+2126Ω, U+03A9 (the Greek letter)Ω, U+03A9
fi ligatureU+FB01unchangedfi
② circled digitU+2461unchanged2
A full-width AU+FF21unchangedA
カ half-width katakanaU+FF76unchangedカ, U+30AB
Korean letters as separate jamoU+1100 U+1161 U+11A8각, U+AC01각, U+AC01

Worked Example

Choose Load a sample: 42 code points and 79 UTF-8 bytes holding an e with a separate accent, a ligature, full-width letters, an ohm sign, an angstrom sign, a superscript, ™, …, a circled digit and a Korean syllable as three jamo. NFC makes 39 code points and 70 bytes: the accent joins the e, the three jamo become one syllable, and the ohm and angstrom signs become the Greek Ω and the letter Å. The ligature, superscript, ™ and full-width letters stay. NFKC makes 43 code points and 51 bytes, because it also writes fi, x2, TM, three dots, 2 and ABC123, and turns the half-width カ into カ.

Normalizing does not remove accents or change case

NFD separates an accent from its letter; it does not delete it. To strip accents, use the Accent Remover; to find characters you cannot see, use the Hidden Character Detector. Normalization also leaves letters in their original case.

Frequently Asked Questions

What is the difference between NFC, NFD, NFKC and NFKD?
The C forms compose: an e and a combining accent become the single é. The D forms decompose: é becomes e plus an accent. The K forms also replace compatibility characters, such as ligatures, superscripts and full-width letters, with their plain equivalents. NFC and NFD only reorganize the same characters; NFKC and NFKD change what the text says.
Which normalization form should I use?
Use NFC for storing and exchanging text; it is the form the web favours and what most keyboards produce. Use NFKC when matching, searching or comparing identifiers, where you want fi and A to count as fi and A. Python, for example, normalizes identifiers to NFKC. Keep a copy of the original if you use a K form.
Why do two strings that look identical not match?
They probably use different code points for the same text. The usual causes are an accented letter written as one character in one place and as a letter plus a combining accent in another, full-width or ligature characters, and invisible characters such as zero-width spaces. Normalize both to the same form, then compare. If they still differ, look for hidden characters.
How do I convert full-width characters to half-width?
Tick Full-width to half-width and choose NFC or None. Characters from U+FF01 to U+FF5E are moved down to the ASCII range, the ideographic space U+3000 becomes an ordinary space, and the full-width currency signs become ¢, £, ¬, ¯, ¦, ¥ and ₩. Half-width katakana are left as they are; NFKC converts those to full-width katakana.
How do I fix fi and fl ligatures copied from a PDF?
Tick Expand ligatures. ff, fi, fl, ffi, ffl and the two st ligatures become plain letters, so searching for fi finds them. NFKC does the same and much more. The checkbox for Æ, æ, Œ, œ is separate because those are real letters in some languages, and you may want to keep them.
Is normalization reversible?
NFC and NFD can be switched between, but they cannot restore every original, because a few characters are replaced by their canonical equivalents: the ohm sign becomes the Greek capital omega for good. NFKC and NFKD cannot be undone, since ² and 2 become the same character.

Related Tools

More in Text Cleanup & Formatting

See all Text Cleanup & Formatting