A worked example, rendered from real sample data. Sign in to run the tool on your own input.
Hello, World! This is a sample text to count bytes in different encodings. Unicode: éèê=== Byte Count ===
UTF-8: 90 bytes (90 B)
UTF-16: 174 bytes (176 with BOM)
UTF-32: 348 bytes
gzip: 104 bytes (-16% smaller)
Base64: 120 chars
URL-encoded: 134 chars
=== Characters ===
UTF-16 units: 87
Code points: 87
Graphemes: 87
ASCII: 84 · Non-ASCII: 3
UTF-8 widths: 1-byte 84 · 2-byte 3 · 3-byte 0 · 4-byte 0
Control: 0
Lines: 1 (none) · Words: 15 · Longest line: 87 chars
BOM: none
Show byte size of text in UTF-8, UTF-16, and ASCII. Part of the DevTools Surf developer suite. Browse more tools in the Text / String collection.