# BIT_LENGTH

Returns the bit length of a string. All strings are in UTF-8, so a single character can use multiple bytes.

## Syntax

`BIT_LENGTH(string)`

### Parameters

#### string

String expression. If `null`, the function returns `null`.

## Examples

Calculates the number of characters and the bit length (in bits) of the city names for airports located in India.

```esql
FROM airports
| WHERE country == "India"
| KEEP city
| EVAL fn_length = LENGTH(city), fn_bit_length = BIT_LENGTH(city)
```