# perldoc > chr

---
type: CommandReference
command: chr
mode: perldoc
section: 
source: perldoc
---

## Quick Reference

- `chr(NUMBER)` — returns the character represented by NUMBER
- `chr` — uses `$_` if NUMBER omitted

## Name

**chr** — returns the character represented by that NUMBER in the character set.

## Synopsis

text
chr NUMBER
chr
## Options

None.

## Examples

perl
chr(65)       # "A" (ASCII or Unicode)
chr(0x263a)   # Unicode smiley face
chr(-1)       # Unicode replacement character (chr(0xfffd)) under default
chr(256)      # under bytes pragma: low eight bits (0) used
Note: Characters from 128 to 255 are by default internally not encoded as UTF-8 for backward compatibility.

## See Also

- `ord` — reverse function
- [perlunicode](https://perldoc.perl.org/perlunicode) — more about Unicode
- [chr function](https://perldoc.perl.org/functions/chr) — official documentation

## Exit Codes

Not documented.