In C#, Convert.ToChar returns a char—one UTF-16 code unit.
A string argument must be exactly one character long. Numeric overloads map integer codes to characters. Empty or longer strings throw.
This is a static member of System.Convert. You call it with the type name, such as Convert.ToChar(...). Convert is the everyday API for converting between common CLR types in C#.
Syntax
Pass a one-character string or a character code.
C#
char a = Convert.ToChar("A");
char b = Convert.ToChar(65);
char c = Convert.ToChar('Z');
Call
What it does
Convert.ToChar("A")
Single-character string → char.
Convert.ToChar(65)
Code point 65 → 'A'.
Convert.ToChar('Z')
Already a char (identity).
Strings longer than one character throw FormatException. null throws for string overload.
Library declarations
C#
public static char ToChar(string value);
public static char ToChar(int value);
public static char ToChar(object? value);
Parameters
Parameter
Description
value
Required. One-character string, integer code, or convertible object.
Return Value
Return Value
Description
char
The resulting character.
C# Examples
Example 1 — One Letter String
Convert a single-character string to char.
C#
using System;
class Program {
static void Main() {
char ch = Convert.ToChar("Q");
Console.WriteLine(ch);
Console.WriteLine((int)ch);
}
}
Output
Q
81
How It Works
One character."Q" is valid length for ToChar.
Print letter. Console shows Q.
Cast to int. Shows the Unicode code 81.
Length rule. Longer strings would throw instead.
Example 2 — Integer Code to Char
Build a letter from its numeric code.
C#
using System;
class Program {
static void Main() {
char a = Convert.ToChar(65);
char b = Convert.ToChar(66);
Console.WriteLine(a.ToString() + b);
}
}
Output
AB
How It Works
65 is A. Classic ASCII/Unicode mapping.
66 is B. Next code yields the next letter.
Concatenate. Two chars join into the string AB.
Range check. Codes outside char limits throw OverflowException.
Example 3 — Turn Digit Text into Char
Keep a digit as a character, not as an int.
C#
using System;
class Program {
static void Main() {
char d = Convert.ToChar("7");
Console.WriteLine(d);
Console.WriteLine(char.IsDigit(d));
}
}
Output
7
True
How It Works
Still a char."7" becomes the character '7', not integer 7.
IsDigit. Confirms the result is a decimal digit character.
Different from ToInt32. ToInt32("7") would return int 7.
Pick the API. Use ToChar when you need a character value.
Frequently Asked Questions
No. The string must be exactly one character.
The character 'A'.
No. The string overload throws on null.
Similar for numeric codes; ToChar also handles string/object overloads.