C# String IsNormalized() Method

Intermediate
5 min read
Updated: Nov 2026
3 examples
String

Definition

In C#, IsNormalized() answers a yes or no question: is this string already in a standard Unicode form? With no argument it checks Form C, the same form Normalize() produces by default.

It is useful before normalizing: if the answer is true, you can skip the work and avoid making a new string. Plain ASCII text is always normalized. Text with combining accents typed separately, such as e + U+0301, is not in Form C.

This is an instance member of System.String. Call it on a string variable, such as text.IsNormalized(...). Calling it on a null variable throws NullReferenceException. It only reads the text. Strings are immutable, so the original string is never changed.

Syntax

Call it with no argument for Form C, or pass the form to check.

C#
using System.Text;

bool a = "\u00e9".IsNormalized();                              // True
bool b = "e\u0301".IsNormalized();                             // False
bool c = "e\u0301".IsNormalized(NormalizationForm.FormD);      // True
CallWhat it does
text.IsNormalized()Is it in Form C?
text.IsNormalized(NormalizationForm.FormD)Is it in Form D (letters and accents split)?
if (!text.IsNormalized()) text = text.Normalize();Normalize only when needed.

A string can be normalized in one form and not in another, so always check the form you plan to use. Invalid Unicode (for example a lone surrogate half) throws ArgumentException.

Library declarations
C#
public bool IsNormalized();
public bool IsNormalized(NormalizationForm normalizationForm);

Parameters

ParameterDescription
normalizationFormOptional. The form to check against. The default is FormC.

Return Value

Return ValueDescription
trueThe string is already in that form.
falseCalling Normalize with that form would change it.

C# Examples

Example 1 — Which Strings Are Normalized?

Check a precomposed letter, a decomposed letter, and a ligature against different forms.

C#
using System;
using System.Text;

class Program {
    static void Main() {
        Console.WriteLine("\u00e9".IsNormalized());
        Console.WriteLine("e\u0301".IsNormalized());
        Console.WriteLine("e\u0301".IsNormalized(NormalizationForm.FormD));
        Console.WriteLine("\uFB01".IsNormalized(NormalizationForm.FormKC));
        Console.WriteLine("hello".IsNormalized());
    }
}

How It Works

  1. Already combined. U+00E9 is the Form C spelling of é, so the first check is True.
  2. Split letter, wrong form. e + U+0301 is the Form D spelling, so it is not in Form C.
  3. Right form, right answer. Checked against Form D, the same split string is normalized.
  4. Ligatures and ASCII. The fi ligature is not in Form KC, which would split it into fi. Plain hello is normalized in every form.

Example 2 — Normalize Only When Needed

Check a name typed with a separate accent, normalize it, and check again.

C#
using System;

class Program {
    static void Main() {
        string name = "Jose\u0301";

        Console.WriteLine(name.Length);
        Console.WriteLine(name.IsNormalized());

        if (!name.IsNormalized()) {
            name = name.Normalize();
        }

        Console.WriteLine(name.Length);
        Console.WriteLine(name.IsNormalized());
    }
}

How It Works

  1. A separate accent. Jose plus U+0301 shows as José, but takes 5 chars.
  2. Not Form C yet. The check is False, because the accent could be combined with the e.
  3. Fix only if necessary. The if calls Normalize() just for text that needs it; already-clean names skip the work.
  4. Combined and confirmed. After normalizing, the name has 4 chars and the check returns True.

Example 3 — Spot Look-Alike User Names

Two names look the same but were typed differently. Find out which one is not normalized, then compare them properly.

C#
using System;

class Program {
    static void Main() {
        string a = "Zo\u00eb";
        string b = "Zoe\u0308";

        Console.WriteLine(a == b);
        Console.WriteLine(a.IsNormalized());
        Console.WriteLine(b.IsNormalized());
        Console.WriteLine(a == b.Normalize());
    }
}

How It Works

  1. Same name on screen. Both display as Zoë: a uses U+00EB, while b uses e plus a combining diaeresis (U+0308).
  2. A direct compare fails. The chars differ, so == is False, which could let two accounts share one visible name.
  3. Find the odd one out. a is in Form C; b is not.
  4. Normalize before storing. After normalizing b, the two names are equal. Saving every name in Form C prevents duplicates like this.

Frequently Asked Questions

It returns true when the string is already in the given Unicode normalization form (FormC by default) and false when Normalize would change it.
You can. If IsNormalized returns true, you skip creating a new string. Normalize also returns quickly for normalized input, so for small strings either way is fine.
Yes. Plain ASCII characters are normalized in FormC, FormD, FormKC, and FormKD.
Yes. A precomposed é is in FormC but not in FormD, and a decomposed e + accent is the opposite.
No. It only checks and returns a bool.

Next: IsNullOrEmpty()

Check in one call whether a string is null or has no characters.

IsNullOrEmpty() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

12 people found this page helpful