Docly Developers
Function Updated 02 Jun 2026

String.normalize([form])

Returns the Unicode Normalization Form of the string, allowing comparison of strings that may use different code-point sequences for the same characters.

Parameters

formstringoptional

The Unicode Normalization Form to use. One of "NFC" (default), "NFD", "NFKC" or "NFKD".

Returns

A new string containing the Unicode Normalization Form of the given string.

Example

Mixed HTML (or any text file) with inline JavaScript between hash signs.
#{
    let str = "\u00C5"; // Å as a single code point
    let normalized = str.normalize("NFD"); // decomposed form
    write(`Length NFC: ${str.length}, length NFD: ${normalized.length}`);
}#