onlineunicodetools logo

Unicode length counter

World's simplest unicode tool

This browser-based utility counts individual characters (graphemes) and the total number of bytes in Unicode text. Anything that you paste or enter in the text area on the left automatically gets split into symbols or bytes and gets counted on the right. It supports the most popular Unicode encodings (such as UTF-8, UTF-16, and UTF-32) and it works with emoji characters. You can also select input Unicode text encoding and adjust whitespace counting. Created by encoding gurus from team Browserling.
announcement we've created devurls!
We just created another project – DEVURLS – world's simplest developer news aggragator. Check it out!
fullscreen fullscreen_exit
Counter Options
Count the number of individual symbols in Unicode text.
Count the number of encoded bytes.
Select Unicode encoding for calculating bytes.
Whitespace Options
Don't count newline characters.
Don't count tab characters.
Don't count space characters.
Unicode length counter tool What is a unicode length counter?
This utility finds the length of Unicode data. It can calculate the number of graphemes in Unicode text or the number of bytes these graphemes take when encoded in various Unicode encodings. A grapheme is a single symbol of a written language. Some examples of graphemes are regular letters (e.g. "e" or "ǣ"), symbols (e.g. "☯" or "☎"), numbers (e.g. "5" or "Π"), emojis (e.g. "🌙" or "💎") and many others. Each grapheme has a length of one but when encoded in computer memory, it can consist of many bytes. The number of bytes required depends on the selected Unicode encoding. For example, the star character "⭐" uses 3 bytes in UTF8 encoding, 2 bytes in UTF16 encoding, and 4 bytes in UTF32 encoding. When calculating the length of Unicode text, you can switch between grapheme mode and byte mode in the options. We also have three extra options for managing whitespace counting. Namely, you can exclude counting of newlines, tabs, and spaces.
Unicode length counter examples Click to use
Unicode Maze
In this example, we draw a maze using Unicode box drawing symbols. The objective of this puzzle is for the mouse to get to the cheese. The mouse, cheese, and all box characters are graphemes and we count how many of them are in this puzzle. We also include newlines, tabs, and spaces in the result. We find that this maze is made out of 258 graphemes.
🐭 ┃ ┣━━━━━━━┳━━━━━━━━━┳━━━━━┓ ┃ ┗━┓ ┏━┛ ┃ ╻ ╺━━━━━┛ ╺━┓ ┃ ┣━┓ ┃ ┗━┓ ┗━┻━━━━━━━┳━╸ ┃ ┃ ┃ ┃ ┣━╸ ┣━━━━━┳━━━┓ ┗━━━┛ ┃ ┃ ┃ ┃ ┏━┛ ┏━╸ ┃ ╻ ┣━━━┳━╸ ┃ ┃ ┗━━━┫ ╻ ┣━━━━━┫ ┗━╸ ┃ ┏━┫ ┃ ┏━━━┫ ┃ ┃ ╺━┓ ┗━━━┓ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┗━┓ ┗━━━┓ ┗━┻━╸ ┃ ┗━━━┫ ┏━┻━━━━━━━━━┻━━━━━━━┛   🧀
258
Required options
These options will be used automatically if you select this example.
Count the number of individual symbols in Unicode text.
Don't count newline characters.
Don't count tab characters.
Don't count space characters.
Pixar Animation Studios
In this example, we create the logo for the American animation studio "Pixar" using different Unicode characters. It is easy to see that the name consists of only five graphemes, so we decided to calculate the number of bytes here. It turns out that these five symbols take 26 bytes in the UTF8 encoding, 24 bytes in UTF16 encoding, and 28 in UTF32 encoding.
🅿️💡🆇🅰️🆁
26
Required options
These options will be used automatically if you select this example.
Count the number of encoded bytes.
Select Unicode encoding for calculating bytes.
Don't count newline characters.
Don't count tab characters.
Don't count space characters.
Unicode Chess
This example counts the number of bytes of a chess set in the UTF16 encoding. It ignores newline characters, and as a result, the output value is 500 bytes. For UTF32 encoding there are twice as many bytes, namely 1000 because one character in UTF16 usually takes 2 bytes but in UTF32 always takes 4 bytes. For UTF8 encoding it is much less – 298 bytes because it's a variable-width encoding with one to four bytes per symbol.
♔ – white chess king ♕ – white chess queen ♖ – white chess rook ♗ – white chess bishop ♘ – white chess knight ♙ – white chess pawn ♚ – black chess king ♛ – black chess queen ♜ – black chess rook ♝ – black chess bishop ♞ – black chess knight ♟ – black chess pawn
500
Required options
These options will be used automatically if you select this example.
Count the number of encoded bytes.
Select Unicode encoding for calculating bytes.
Don't count newline characters.
Don't count tab characters.
Don't count space characters.
Pro tips Master online unicode tools
You can pass input to this tool via ?input query argument and it will automatically compute output. Here's how to type it in your browser's address bar. Click to try!
https://onlineunicodetools.com/count-unicode-characters?input=%F0%9F%90%AD%0A%E2%94%83%20%E2%94%A3%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%B3%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%B3%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%93%0A%E2%94%83%20%E2%94%97%E2%94%81%E2%94%93%20%E2%94%8F%E2%94%81%E2%94%9B%20%E2%94%83%20%E2%95%BB%20%E2%95%BA%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%9B%20%E2%95%BA%E2%94%81%E2%94%93%20%E2%94%83%0A%E2%94%A3%E2%94%81%E2%94%93%20%E2%94%83%20%E2%94%97%E2%94%81%E2%94%93%20%E2%94%97%E2%94%81%E2%94%BB%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%B3%E2%94%81%E2%95%B8%20%E2%94%83%20%E2%94%83%0A%E2%94%83%20%E2%94%83%20%E2%94%A3%E2%94%81%E2%95%B8%20%E2%94%A3%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%B3%E2%94%81%E2%94%81%E2%94%81%E2%94%93%20%E2%94%97%E2%94%81%E2%94%81%E2%94%81%E2%94%9B%20%E2%94%83%0A%E2%94%83%20%E2%94%83%20%E2%94%83%20%E2%94%8F%E2%94%81%E2%94%9B%20%E2%94%8F%E2%94%81%E2%95%B8%20%E2%94%83%20%E2%95%BB%20%E2%94%A3%E2%94%81%E2%94%81%E2%94%81%E2%94%B3%E2%94%81%E2%95%B8%20%E2%94%83%0A%E2%94%83%20%E2%94%97%E2%94%81%E2%94%81%E2%94%81%E2%94%AB%20%E2%95%BB%20%E2%94%A3%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%AB%20%E2%94%97%E2%94%81%E2%95%B8%20%E2%94%83%20%E2%94%8F%E2%94%81%E2%94%AB%0A%E2%94%83%20%E2%94%8F%E2%94%81%E2%94%81%E2%94%81%E2%94%AB%20%E2%94%83%20%E2%94%83%20%E2%95%BA%E2%94%81%E2%94%93%20%E2%94%97%E2%94%81%E2%94%81%E2%94%81%E2%94%93%20%E2%94%83%20%E2%94%83%20%E2%94%83%0A%E2%94%83%20%E2%94%83%20%E2%94%83%20%E2%94%83%20%E2%94%83%20%E2%94%97%E2%94%81%E2%94%93%20%E2%94%97%E2%94%81%E2%94%81%E2%94%81%E2%94%93%20%E2%94%97%E2%94%81%E2%94%BB%E2%94%81%E2%95%B8%20%E2%94%83%0A%E2%94%97%E2%94%81%E2%94%81%E2%94%81%E2%94%AB%20%E2%94%8F%E2%94%81%E2%94%BB%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%BB%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%9B%0A%E3%80%80%20%20%F0%9F%A7%80&count-graphemes=true&ignore-newlines=false&ignore-tabs=false&ignore-spaces=false
All unicode tools
Didn't find the tool you were looking for? Let us know what tool we are missing and we'll build it!
Quickly convert Unicode data to base-2 (binary).
Quickly convert Unicode data to base-8 (octal).
Quickly convert Unicode data to base-10 (decimal).
Quickly convert Unicode data to base-16 (hexadecimal).
Quickly find code positions of all Unicode values.
Quickly decode code positions to Unicode values.
Quickly split Unicode data into graphemes.
Quickly circularly rearrange Unicode symbols.
Quickly generate all Unicode values from the given code point interval.
Quickly filter Unicode symbols that are within the given code point interval.
Quickly generate random Unicode text in a given range.
Quickly create a picture from Unicode symbols.
Quickly reverse the order of symbols in Unicode text.
Quickly find the length of Unicode text.
Quickly encode Unicode values to base64.
Quickly encode Unicode values to a data URI.
Quickly rotate Unicode characters to the left and right.
Quickly extract all characters from Unicode text.
Quickly split Unicode data into pieces.
Quickly split Unicode text into chunks of constant length.
Quickly merge Unicode snippets together.
Quickly create multiple copies of Unicode text.
Quickly shorten Unicode text to the given length.
Quickly left-pad Unicode text with any character.
Quickly right-pad Unicode text with any character.
Quickly align Unicode data to the center.
Quickly align Unicode data to the right.
Quickly increase or decrease Unicode code point values.
Quickly convert ordinary numbers to Unicode numbers in various fonts.
Coming soon These unicode tools are on the way
Name Unicode Symbols
Spell out the names of Unicode characters in the input text.
URL-encode Unicode
URL-escape Unicode text.
URL-decode Unicode
URL-unescape Unicode text.
Convert Binary to Unicode
Convert base-2 data to Unicode encoding.
Convert Octal to Unicode
Convert base-8 data to Unicode encoding.
Convert Decimal to Unicode
Convert base-10 data to Unicode encoding.
Convert Hex to Unicode
Convert base-16 data to Unicode encoding.
Convert Unicode to Any Base
Convert Unicode text to any radix.
Convert Any Base to Unicode
Convert any radix data to Unicode.
Convert Unicode to ASCII
Convert Unicode characters to ASCII characters.
Convert ASCII to Unicode
Convert ASCII characters to Unicode characters.
Convert Unicode to Latin1
Convert Unicode text to Latin1 encoding.
Convert Latin1 to Unicode
Convert Latin1 encoded data to Unicode.
Convert Unicode to Bytes
Convert Unicode characters to raw bytes.
Convert Bytes to Unicode
Convert raw bytes to Unicode.
Validate Unicode
Check if the given Unicode has valid encoding.
Convert Unicode to Punycode
Encode Unicode text to Punycode encoding.
Convert Punycode to Unicode
Decode Punycode encoding to Unicode.
Decode Base64 to Unicode
Convert base64 data to Unicode text.
Encode Unicode to Data URI
Convert Unicode to a valid data URL.
Decode Data URI to Unicode
Convert a valid data URL to Unicode text.
Convert Unicode to HTML
Encode Unicode data to HTML entities.
Convert HTML to Unicode
Decode HTML entities to Unicode data.
Convert Unicode to UTF8
Encode Unicode text to UTF8 encoding.
Convert UTF8 to Unicode
Decode UTF8 encoding to Unicode.
Convert Unicode to UTF16
Encode Unicode text to UTF16 encoding.
Convert UTF16 to Unicode
Decode UTF16 encoding to Unicode.
Convert Unicode to UTF32
Encode Unicode text to UTF32 encoding.
Convert UTF32 to Unicode
Decode UTF32 encoding to Unicode.
Convert Unicode to Uppercase
Convert all Unicode characters to uppercase.
Convert Unicode to Lowercase
Convert all Unicode characters to lowercase.
Convert Unicode to Randomcase
Randomize case of all Unicode characters.
Convert Unicode to Lowercase
Convert all Unicode characters to lowercase.
JSON Stringify Unicode
Encode Unicode to JSON.
JSON Parse Unicode
Decode JSON to Unicode.
Generate Zalgo Unicode
Let Zalgo destroy your Unicode.