Unicode NFD Decomposer

Decompose precomposed Unicode characters to NFD base + marks

Normalise text to Unicode NFD (Canonical Decomposition), splitting precomposed accented characters into a base letter plus combining marks. Inspect code points before and after, all in your browser. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What does NFD normalisation do?

NFD stands for Normalization Form D, or Canonical Decomposition. It splits precomposed characters such as e-acute into a base letter and one or more combining marks, then orders those marks canonically.

NFD (Normalization Form D) takes precomposed characters apart, turning a single accented letter into a base letter followed by its combining marks. It is the form you reach for when you need to strip diacritics, compare text without caring about accents, or prepare text for sorting. This tool applies NFD and lists the code points before and after so you can see exactly what changed.

The four Unicode normalization forms

Unicode defines four normalization forms, each serving a different purpose:

FormFull nameWhat it does
NFCCanonical Decomposition, Canonical CompositionDecomposes then recomposes; results in precomposed characters. Most common for storage and interchange.
NFDCanonical DecompositionDecomposes only; base letters separated from combining marks. Used for diacritic stripping and some sorting.
NFKCCompatibility Decomposition, Canonical CompositionAlso collapses compatibility variants (ligatures, full-width forms, enclosed numbers).
NFKDCompatibility DecompositionDecomposes compatibility variants and canonical marks; most aggressive expansion.

This tool applies NFD: it decomposes precomposed characters into base letter + combining marks, but does not then recompose them. The result has more code points than the input, but is canonically equivalent — it renders identically.

How it works

NFD performs a canonical decomposition only — there is no recomposition step:

é  (U+00E9)  ->  e + ◌́   (U+0065 U+0301)
ñ  (U+00F1)  ->  n + ◌̃   (U+006E U+0303)
ü  (U+00FC)  ->  u + ◌̈   (U+0075 U+0308)
ç  (U+00E7)  ->  c + ◌̧   (U+0063 U+0327)

Combining marks are placed in canonical order after decomposition, so that equivalent sequences — a base letter with two combining marks in different order — always produce the same NFD result. This makes NFD safe for string comparison: if two strings are canonically equivalent, their NFD forms are identical byte sequences.

The conversion uses the engine’s native String.prototype.normalize("NFD").

The most important use case: accent stripping

After NFD decomposition, all diacritical marks appear as standalone characters in the Combining Diacritical Marks block (U+0300–U+036F). Removing them with a regex produces a plain ASCII-only or accent-free version of the text:

function stripAccents(str) {
  return str.normalize("NFD").replace(/[̀-ͯ]/g, "");
}

stripAccents("café")   // "cafe"
stripAccents("résumé") // "resume"
stripAccents("naïve")  // "naive"
stripAccents("Ångström") // "Angstrom"

This technique underpins accent-insensitive search, URL slug generation, and transliteration preprocessing across web applications.

String comparison after NFD

NFD is widely used to ensure that canonically equivalent strings compare as equal:

const a = "é";    // e + combining acute = é (NFD form)
const b = "é";     // precomposed é (NFC form)

a === b                         // false (different byte sequences)
a.normalize("NFD") === b.normalize("NFD") // true

This is the standard fix for the “same text, different string” bug that appears when text arrives from different sources — a form submission, a database row, and a hard-coded constant — and they were stored in different normalization forms.

NFD vs NFC: when to use which

Use NFC for storage and general interchange — it is the most compact canonical form and the default on the web and in most databases. Use NFD when you need to process combining marks individually, strip accents, or perform NFD-based collation (some locale collation algorithms work on NFD input). For compatibility equivalence (collapsing fi into fi, full-width A into A), use NFKD instead.

All processing in this tool uses the browser’s native String.prototype.normalize; your text never leaves your device.