> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LEN

> Returns the number of Unicode characters in a string.

<div className="e6-meta"><span className="e6-eyebrow e6-eyebrow--quiet">Scalar function</span></div>

**Aliases:** [`length`](/query/sql/functions/string/length)

Returns NULL for NULL input.

## Syntax

### Len string (scalar)

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
len(value)
```

* LEN takes one STRING argument. Use LENGTH for BINARY inputs.

## Arguments

| Name | Type | Required | Description |
| - | - | - | - |
| value | STRING | Yes | The string to measure. |

## Returns

* Type: INTEGER; BIGINT for strings using large-string storage
* Possible values: A nonnegative Unicode character count.
* NULL behavior: Returns NULL for NULL input.

## Properties

| Property | Value |
| - | - |
| Deterministic | Yes |
| Supports window usage | No |
| Exact result | Yes |

## Usage notes

* Counts Unicode code points, not bytes.

## Examples

### Example values

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT len('é') AS characters, len(CAST(NULL AS STRING)) AS null_value;
```

| characters | null\_value |
| - | - |
| 1 | NULL |

### Unicode characters and trailing spaces

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT len('é猫') AS character_count, len('cat ') AS with_space;
```

| character\_count | with\_space |
| - | - |
| 2 | 4 |

## Limitations

* LEN accepts STRING inputs. Use [LENGTH](/query/sql/functions/string/length) for BINARY.
* Large-string columns can return BIGINT even when query tools report INTEGER.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.