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

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.firebolt.io/feedback

```json
{
  "path": "/reference-sql/functions-reference/string/length",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

> Reference material for LENGTH function

# LENGTH

Calculates the length of the input string.

When used with an array argument, `LENGTH` is a synonym for [ARRAY\_LENGTH](/reference-sql/functions-reference/array/array-length)

## Syntax

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
LENGTH(<expression>)
```

## Parameters

| Parameter      | Description                                               | Supported input types                                                                                    |
| :------------- | :-------------------------------------------------------- | :------------------------------------------------------------------------------------------------------- |
| `<expression>` | The string or binary data for which to return the length. | `TEXT`, `BYTEA`. For `ARRAY`, see [ARRAY\_LENGTH](/reference-sql/functions-reference/array/array-length) |

## Return Type

`INTEGER`

## Example

Use the `LENGTH` to find the length of any string, such as:

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT LENGTH('The Accelerator Cup')
```

Spaces are included in the calculation of the total length of the string.

**Returns**: `19`
