Skip to content
Test versionSearch

Developer tools

Unicode normalisation and code-point comparison

Normalise text to NFC, NFD, NFKC or NFKD and compare the number of code points and UTF-16 units with the original input text.

How it worksFAQRelated tools

Content reviewed:

The example values can be changed. Press Calculate to update the result; you can download it as TXT or CSV and collect scenarios in this tab. Nothing is saved or sent automatically.

Uses the browser’s String.normalize. NFC and NFD only change how accented letters are stored (é as one character or as e plus an accent); NFKC and NFKD also replace compatibility characters, for example fi becomes fi and ² becomes 2, which can change meaning. Counts are code points, so an emoji built from several parts counts as several. Results can differ slightly between browser versions. Text to encode may have up to 400 characters, text to decode up to 500; a result longer than 500 characters is refused. Control characters are not accepted. You can also load a one-line UTF-8 file of up to 32 KiB. Downloads: TXT, CSV (lines that look like formulas are protected for spreadsheets), JSON and printable HTML. Nothing is saved or sent automatically.

Decimal results are approximate. Inputs stay in this browser tab.

How it works

Text is converted with the browser’s standard functions (UTF-8 encoder, JSON, String.normalize) or the RFC 4648 Base32 alphabet. Each direction is checked strictly, so invalid input is refused instead of guessed. Uses the browser’s String.normalize. NFC and NFD only change how accented letters are stored (é as one character or as e plus an accent); NFKC and NFKD also replace compatibility characters, for example fi becomes fi and ² becomes 2, which can change meaning. Counts are code points, so an emoji built from several parts counts as several. Results can differ slightly between browser versions. Text to encode may have up to 400 characters, text to decode up to 500; a result longer than 500 characters is refused. Control characters are not accepted. You can also load a one-line UTF-8 file of up to 32 KiB. Downloads: TXT, CSV (lines that look like formulas are protected for spreadsheets), JSON and printable HTML. Nothing is saved or sent automatically.

Worked example

With these example values the calculator gives the result below. You can change any value in the form above.

Inputs

Normalisation form
NFC
Text to normalise
Own é fi①

Result

Result text
Own é fi①
Result code points
8
Result UTF-16 units
8
Result UTF-8 bytes
13
Original code points
9
Original UTF-16 units
9
Normalisation change
Changed
Normalisation form
NFC

Frequently asked questions

How do I normalise Unicode text to NFC, NFD, NFKC or NFKD?

Enter your text, pick one of the four normalisation forms and calculate. The tool applies the browser runtime String.normalize and compares the code-point and UTF-16 counts with the original text.

What is the difference between canonical and compatibility normalisation?

NFC and NFD are canonical forms, while NFKC and NFKD are compatibility forms. The forms are distinct, and compatibility normalisation may change meaning or presentation.

Why does the code-point count change after Unicode normalisation?

Normalisation can compose or decompose characters. In the example, NFC reduced a text from 9 to 8 code points and UTF-16 units, and the result was 13 UTF-8 bytes.

Does the Unicode normalisation tool count visible characters?

No. The counts are code points, not grapheme clusters, so a single visible character can count as more than one.

Can Unicode normalisation results differ between browsers?

Yes. Results may differ with the Unicode version of the runtime, because the tool uses the standard runtime String.normalize.

How much text can I normalise at once?

Input is limited to 400 UTF-16 units without control characters or unpaired surrogates, and each output to 500 characters. An optional one-line UTF-8 file of up to 32 KiB can be loaded.

Does the Unicode tool transliterate text or detect lookalike characters?

No. There is no transliteration, no character-name data and no security-equivalence claim.