# Char()

Returns the character specified by the ASCII character code in the first parameter. An optional second parameter specifies the number of times to repeat the character.

This function supports the extended ASCII character set (codes 0–255).

## Availability

<table>
  <tr>
    <td>Marketing Cloud Engagement</td>
    <td>✅ Yes</td>
  </tr>
  <tr>
    <td>Marketing Cloud Next</td>
    <td>✅ Yes</td>
  </tr>
</table>

## Syntax

```
Char(characterCode, numRepetitions)
```

The `Char()` function has two parameters:

- `characterCode` (string): Required. An ASCII character code.
- `numRepetitions` (number): The number of times to repeat the character.

## Usage

To use the function, pass it an ASCII character code.

```
Char(190)
```

The function returns `¾`.

### Repeating Characters

You can use the second parameter to repeat the specified character. This example repeats a character three times.

```
Char(65,3)
```

The function returns `AAA`.

### Referring to Unprintable Characters

This function is helpful for situations that require you to refer to unprintable characters. This example pulls content from a data extension. It then uses the `Replace()` function to replace the carriage return and line feed (CRLF) characters with an HTML `<br />` tag. The character code for the carriage return character is 13, and the code for line feed is 10.

```
%%[
  Var @content, @replacedContent
  Set @content = Lookup('ReplaceTest', 'Value', 'Key', '1')
  Set @replacedContent = Replace(@content, Concat(CHAR(13), CHAR(10)), '<br />')
]%%
<p>%%=v(@content)=%%</p>
<p>%%=v(@replacedContent)=%%</p>
```
