Unicode NFKC Normaliser

Compatibility + composition normalisation — collapses ligatures, widths

Normalise text to Unicode NFKC (Compatibility Composition), folding ligatures, full-width forms, superscripts and circled characters into plain equivalents, then composing marks. Runs in your browser. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What does NFKC normalisation do?

NFKC stands for Normalization Form KC, or Compatibility Composition. It applies compatibility decomposition, which folds variants like ligatures and full-width letters into their plain forms, then recomposes combining marks into precomposed characters.

NFKC (Normalization Form KC) is the most aggressive Unicode normalisation form. It goes beyond NFC’s canonical equivalence and additionally folds compatibility variants — full-width letters, ligatures, superscripts, circled characters, and styled look-alikes — into their plain equivalents, then composes combining marks. Use it when you want visually different but semantically equivalent text to be treated as the same string.

NFC vs NFKC: what is the difference?

Both forms handle combining marks. The key difference is compatibility decomposition:

OperationNFCNFKC
Compose e + ◌́éYesYes
Fold fiNoYes
Fold (full-width A) → ANoYes
Fold ² (superscript) → 2NoYes
Fold (circled digit) → 1NoYes
Fold (trademark) → TMNoYes
ReversibleYesNo

NFC only deals with canonical equivalence — two encodings of the same character. NFKC additionally handles compatibility equivalence — characters that have the same basic meaning but different visual presentation. This makes NFKC lossy: the original styling cannot be recovered.

What gets folded under NFKC

Full-width and half-width forms. Characters in the Halfwidth and Fullwidth Forms block (U+FF00U+FFEF) — such as (U+FF21), (U+FF41), (U+FF11) — are folded to their ASCII equivalents A, a, 1. These appear in East Asian text layout where characters occupy a full double-width cell.

Ligatures. (U+FB01), (U+FB02), (U+FB00), (U+FB03), (U+FB04), (U+FB05), (U+FB06) all decompose into their constituent letters.

Superscripts and subscripts. Mathematical superscripts like ² (U+00B2), ³ (U+00B3), ¹ (U+00B9) and the full Superscript/Subscript block (U+2070U+209F) fold to plain digits and letters.

Circled characters. , and similar enclosed/circled variants fold to their base digits and letters.

Fraction forms. ½ (U+00BD) → 1⁄2, ¼ (U+00BC) → 1⁄4, and so on.

The security case for NFKC

Because compatibility variants are visually similar to plain text but technically different code points, they are used in homograph attacks and filter bypasses. A username example (with full-width ) looks identical to example but is a different string. NFKC normalising usernames, email addresses, and search queries before comparison or storage prevents this class of attack.

Unicode Security Mechanisms (Unicode Technical Report #36) recommends NFKC (often combined with casefolding) as part of the standard preprocessing pipeline for identifiers.

How the tool works

NFKC is implemented via the browser’s native String.prototype.normalize("NFKC"), which applies the full Unicode compatibility decomposition mapping followed by canonical composition. The result can have more characters than the input (a two-character ligature becoming two letters) or fewer (combining sequences composing into precomposed forms).

Example

InputNFKC outputWhat happened
filefilefi ligature → fi
AppleAppleFull-width A → A
H₂OH2OSubscript 2 → 2
10²102Superscript 2 → 2
①②③123Circled digits → digits
e + ◌́éBase + combining mark → precomposed

Because NFKC is not reversible, use it for matching and comparison, not for round-tripping display text you need to preserve. For canonical-only normalisation that keeps visual styling intact, use the NFC tool. All processing runs locally — nothing is uploaded.