Google Sheets function · Text
CHAR in Google Sheets: syntax and examples
CHAR takes a number and returns the matching character from the Unicode table. It is the usual way to insert a line break with CHAR(10) or to build letters from numbers.
Syntax
CHAR(table_number)
Arguments
| Argument | Type | Required | What it does |
|---|---|---|---|
table_number | number | yes | The Unicode number of the character you want, for example 65 for A. |
Examples
The examples use this table, starting in A1:
| Code | Meaning |
| 65 | capital A |
| 97 | lowercase a |
| 259 | a with breve |
| 10 | line break |
=CHAR(65)Result: A
Code 65 is the capital letter A.
Run in a Google Sheet (English US locale) on .
=CHAR(A4)Result: ă
Reads the code from a cell. 259 is a letter with a diacritic.
Run in a Google Sheet (English US locale) on .
=ARRAYFORMULA(CHAR(A2:A4))Result:
| A |
| a |
| ă |
One character per code, returned as a column.
Run in a Google Sheet (English US locale) on .
="Line 1"&CHAR(10)&"Line 2"Result: Line 1
Line 2
CHAR(10) is a line break, placed here between two texts.
Run in a Google Sheet (English US locale) on .
=CHAR(64+3)Result: C
Letter of the alphabet by position: 64 plus 3 gives C.
Run in a Google Sheet (English US locale) on .
Common errors
- The argument is a number. Text such as "abc" returns #VALUE!.
- Codes 0 and below are rejected with #NUM!, so check values that come from other formulas.
- Decimals are cut off, not rounded: CHAR(65.9) still returns A.
- CHAR(10) is one character, so LEN(CHAR(10)) is 1. CODE does the reverse: CODE(CHAR(259)) returns 259.
Compared with Excel
Same syntax as Excel CHAR. Excel limits CHAR to 1 through 255, while Google Sheets takes any Unicode number.