← Functions
chartextfunctionsbeginner

Excel CHAR Function

CHAR converts a numeric code into the character it represents, like a line break or a quotation mark.

CHAR converts a number into the character that number represents in your computer's character set. Give it 65, get "A." Give it 10, get a line break. The catch: CHAR only understands numbers 1 through 255, and a few of the most common codes, especially the line break, behave differently on Windows than they do on older Mac versions of Excel.

Syntax

=CHAR(number)
ParameterRequiredDescription
numberYesThe character code you want converted into a character. Must be a whole number between 1 and 255. Text values, blanks, and numbers outside that range return an error.

A character code is just a number assigned to a specific character. Code 65 always means "A," code 34 always means a double quotation mark, no matter which formula asks for it.

Basic Example

You're building mailing labels and want the street address on one line and the city, state, and zip on the next, all inside a single cell.

=A2&CHAR(10)&B2

// A2       = street address
// CHAR(10) = line break code
// B2       = city, state, zip

This joins A2 and B2 with an invisible line break character between them. The formula returns one text string, but it displays across two lines, as long as wrap text is turned on for that cell. Skip that step and Excel shows the whole thing on one line with a strange gap where the break sits.

How CHAR Works

It converts a code number into a character

CHAR(65) returns "A." CHAR(97) returns "a." CHAR(36) returns "$." The relationship is fixed: each number maps to exactly one character, and that mapping doesn't change based on font, cell format, or worksheet.

Valid codes run from 1 to 255

CHAR was built for the ASCII and ANSI character sets, both of which top out at 255. Ask for CHAR(0) or CHAR(300) and Excel throws a #VALUE! error instead of guessing. If you need characters beyond that range, such as emoji or non-Latin scripts, UNICHAR is the function that handles them.

Windows and Mac don't agree on the line break code

CHAR(10) inserts a line break on Windows. Older versions of Excel for Mac use CHAR(13) instead. If a workbook built on one platform displays broken line breaks on the other, this is almost always why.

CHAR and CODE are opposites

CHAR takes a number and returns a character. CODE does the reverse: feed it a character and it returns the number. =CODE("A") returns 65. =CHAR(65) returns "A." Together they let you move between a character and its numeric identity in either direction.

Common Use Cases

Insert a line break inside a concatenated cell

Combine two fields onto separate lines within one cell, common for addresses, invoices, or contact cards.

=A2 & CHAR(10) & B2 & ", " & C2 & " " & D2

// A2 = street address
// B2 = city
// C2 = state
// D2 = zip code

Enable Wrap Text on the cell (Home > Wrap Text) or the line break won't render, it'll just sit there as an invisible character.

Insert a double quote inside a text string

Quotation marks are tricky in formulas because Excel uses them to mark the start and end of text. CHAR(34) sidesteps that entirely.

="He said " & CHAR(34) & "Approved" & CHAR(34)   // returns: He said "Approved"

Build a bulleted list inside a single cell

Some report layouts need bullet characters without switching to a bulleted list format.

=CHAR(149) & " " & A2 & CHAR(10) & CHAR(149) & " " & A3

// CHAR(149) = bullet character ()
// A2, A3    = list items, each on its own line

Building a reference sheet of common codes saves time. CHAR(10) for a line break, CHAR(34) for a quote, CHAR(9) for a tab, and CHAR(149) for a bullet cover most real-world formulas.

Handling Errors

CHAR returns a #VALUE! error when the code you give it isn't a valid whole number between 1 and 255.

Common causes of #VALUE!:

  • The number is 0, negative, or greater than 255
  • The reference points to an empty cell, which Excel treats as 0
  • The input is text that can't be read as a number, like =CHAR("A")
=IFERROR(CHAR(A2), "Invalid code")

Wrap CHAR in IFERROR when you're building a data-entry template where staff manually type in ASCII codes, since a stray blank cell or typo will otherwise stop the whole calculation with an error instead of a usable fallback value. Keep in mind that IFERROR catches every error type, not just an invalid code, so it will just as easily mask a broken cell reference or a typo somewhere else in the formula. For CHAR specifically that's a smaller risk, since #VALUE! is nearly the only error it ever throws, but it's worth knowing IFERROR doesn't tell the two apart.

Notes & Gotchas

What does the CHAR function do in Excel?

CHAR returns the character that matches a given numeric code, effectively translating a number into text. It's the tool you reach for when you need a character that's awkward or impossible to type directly into a formula, like a line break or a tab.

How do you use CHAR(10) to insert a line break in Excel?

Concatenate CHAR(10) between two pieces of text, like =A2 & CHAR(10) & B2, and Excel inserts a line break at that point in the resulting string. The break won't be visible, though, unless Wrap Text is turned on for the cell. Without it, the text still contains the break character, it just doesn't display across multiple lines.

What is the difference between CHAR and CODE functions in Excel?

CHAR takes a number and returns a character. CODE does the opposite: it takes a character and returns its numeric code. Use CHAR when you know the code and want the symbol; use CODE when you have the symbol and want to know its code.

What character does CHAR(34) represent in Excel?

CHAR(34) returns a double quotation mark ("). It's most useful inside formulas that build text strings containing literal quotes, since typing a raw quotation mark there would break the formula syntax instead of appearing in the result.

Why does CHAR return a #VALUE! error in Excel?

The number argument falls outside the 1 to 255 range, or it isn't a valid whole number at all. This includes referencing a blank cell, which Excel reads as 0, an invalid code that CHAR can't map to any character.

Does CHAR(10) work the same way on Windows and Mac?

Not always. Current Excel for Mac uses CHAR(10) just like Windows, but older Mac versions used CHAR(13) for the line break instead. If a workbook was built years ago on a Mac, or you're troubleshooting a formula that behaves differently across two machines, check which code was actually used.

CHAR only covers the 1-255 range. Anything higher, including most emoji and many non-Latin characters, requires UNICHAR instead. CHAR won't warn you that a character is out of reach; it just throws #VALUE! once you cross 255.

Does CHAR work in Excel for the web?

Only partially. Excel for the web supports CHAR(9), CHAR(10), CHAR(13), and CHAR(32) and above, but not the other control codes below 32. If a workbook uses an unusual low-numbered code and gets opened in a browser instead of the desktop app, that formula may not behave the same way.

What's the difference between CHAR and UNICHAR?

CHAR is limited to the 255-character ASCII and ANSI set built into older versions of Excel. UNICHAR reads the full Unicode standard, which covers tens of thousands of characters across every modern writing system, plus symbols and emoji. If your code number is under 255, either function works the same; above that, only UNICHAR returns a result.

Related Functions

FunctionUse this when...
CODEYou have a character and need its numeric code, the reverse of what CHAR does.
CLEANYou need to strip non-printable characters from text instead of inserting them.