JavaScript Length

length is a property, not a method — it reports how many UTF-16 code units a string contains. For plain ASCII text this equals the visible character count.

Syntax

str.length

Examples

Input Arguments Output
"hello" 5
"😀" 2
↳ Emoji count as 2 UTF-16 units.

Try it live

Type your input and see Length transform it instantly.

Description: Returns the length of a string.

Example: 'blueberry muffin' => 17

Want to go further? Chain Length with other functions in the visual Playground — pipe one output into the next and watch your data transform.

Related functions

© 2026 Heifara Buval