---
schema_version: "1"
id: 7ae9a4d6c7678b8472bb37a1ad1cd1a2abf288b42177b733fc4399aa90d3ff21
title: CHAR_LENGTH / CHARACTER_LENGTH
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/data-cloud-query-guide/references/data-cloud-sql-reference/scalar-func/string-func/char-length.md
canonical_url: https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/char-length.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 09fb04acbc15daabc3d0b0c2f5c40cdd20036aaf69ee225588e17e74402377bb
products:
  - Data 360 Query Guide
  - Data 360 Developer Documentation
---
# `CHAR_LENGTH` / `CHARACTER_LENGTH`

**Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

Returns the number of characters in a string.

## Syntax

```sql
char_length(<string>)
character_length(<string>)
```

## Arguments

### Required

- `<string>`: The string to measure.

## Returns

Returns an integer representing the number of characters in the string.

## Considerations

- Counts characters, not bytes (important for multi-byte UTF-8 characters).
- The `char_length` and `character_length` functions are equivalent.

## Examples

### Count Characters

Get the character count of a string.

```sql
SELECT char_length('jose') AS result;
```

Returns `4`.

## Related Documentation

- [String Types](https://developer.salesforce.com/docs/data/data-cloud-query-guide/datatype/string.md)
