> This page location: String Functions > CHR
> Full Neon documentation index: https://neon.com/docs/llms.txt
> IMPORTANT: If this page contains inaccurate or outdated information, report it: POST to https://neon.com/api/docs-feedback with {"feedback": "describe the issue", "path": "/postgresql/string-functions/chr"}

# PostgreSQL CHR() Function

The PostgreSQL `CHR()` function converts an integer ASCII code to a character or a Unicode code point to a UTF8 character.

## Syntax

The following shows the syntax of the `CHR()` function:

```sql
CHR(num)
```

## Arguments

The `CHR()` function requires one argument:

**1) `num`**

The num argument is an integer that is converted to the corresponding ASCII code.

It could be a Unicode code point which is converted to a UTF8 character.

## Return Value

The `CHR()` function returns a character that corresponds the ASCII code value or Unicode code point.

## Examples

The following example shows how to use the `CHR()` function to get the characters whose ASCII code value is 65 and 97:

```sql
SELECT
    CHR(65),
    CHR(97);
```

The query returns character A for 65 and a for 97:

![PostgreSQL CHR - ASCII example](https://neon.com/postgresqltutorial/PostgreSQL-CHR-ASCII-example.png)
Here is an example of getting the UTF8 character based on the Unicode code point 937:

```sql
SELECT
    CHR(937);
```

The output for the Unicode code point 937 is Ω, which is what we expected.

![PostgreSQL CHR - Unicode example](https://neon.com/postgresqltutorial/PostgreSQL-CHR-Unicode-example.png)

## Remarks

To get the ASCII code or UTF-8 character of an integer, you use the [`ASCII()`](https://neon.com/postgresql/string-functions/postgresql-ascii) function.

In this tutorial, you have learned how to use the PostgreSQL `CHR()` function to get the character based on its ASCII value or Unicode code point.

---

## Related docs (String Functions)

- [ASCII](https://neon.com/postgresql/string-functions/ascii)
- [CONCAT](https://neon.com/postgresql/string-functions/concat-function)
- [CONCAT_WS](https://neon.com/postgresql/string-functions/concat_ws)
- [FORMAT](https://neon.com/postgresql/string-functions/format)
- [INITCAP](https://neon.com/postgresql/string-functions/initcap)
- [LEFT](https://neon.com/postgresql/string-functions/left)
- [LENGTH](https://neon.com/postgresql/string-functions/length-function)
- [LOWER](https://neon.com/postgresql/string-functions/lower)
- [LPAD](https://neon.com/postgresql/string-functions/lpad)
- [LTRIM](https://neon.com/postgresql/string-functions/ltrim)
- [MD5](https://neon.com/postgresql/string-functions/md5)
- [POSITION](https://neon.com/postgresql/string-functions/position)
- [REGEXP_MATCHES](https://neon.com/postgresql/string-functions/regexp_matches)
- [REGEXP_REPLACE](https://neon.com/postgresql/string-functions/regexp_replace)
- [REPEAT](https://neon.com/postgresql/string-functions/repeat)
- [REVERSE](https://neon.com/postgresql/string-functions/reverse)
- [REPLACE](https://neon.com/postgresql/string-functions/replace)
- [RIGHT](https://neon.com/postgresql/string-functions/right)
- [RPAD](https://neon.com/postgresql/string-functions/rpad)
- [RTRIM](https://neon.com/postgresql/string-functions/rtrim)
- [SPLIT_PART](https://neon.com/postgresql/string-functions/split_part)
- [SUBSTRING](https://neon.com/postgresql/string-functions/substring)
- [TO_CHAR](https://neon.com/postgresql/string-functions/to_char)
- [TO_NUMBER](https://neon.com/postgresql/string-functions/to_number)
- [TRANSLATE](https://neon.com/postgresql/string-functions/translate)
- [TRIM](https://neon.com/postgresql/string-functions/trim-function)
- [UPPER](https://neon.com/postgresql/string-functions/upper)
