Text
Size Calculator
Instantly calculate size of text. Drop a file or paste your text below to check text size in kb, bytes, words, characters, and lines. All measurements occur locally in your browser.
UTF-8 (default web
standard,
multi-byte characters like emojis take more space) or ASCII (1
character = 1 byte estimation). This is crucial when you calculate text size in kb
online accurately.When you need to convert text to KB or calculate text size in KB online, character encoding plays a fundamental role. In standard UTF-8, basic English ASCII characters require 1 byte, while emojis and special symbols can take up to 4 bytes. Here is a quick reference table for common text lengths and byte conversions:
| Characters (Plain Text) | Raw Bytes (UTF-8) | Size in KB (1024 B) | Real-World Example |
|---|---|---|---|
| 160 characters | 160 Bytes | ~0.16 KB | Single SMS text message (7-bit GSM) |
| 1,000 characters | 1,000 Bytes | ~0.98 KB | Standard 1-page single-spaced text |
| 5,000 characters | 5,000 Bytes | ~4.88 KB | Full blog article or standard JSON API payload |
| 25,000 characters | 25,000 Bytes | ~24.41 KB | Technical documentation page / HTML source |
| 262,144 characters | 262,144 Bytes | 256 KB | Maximum AWS SQS / Amazon SNS message limit |
| 1,048,576 characters | 1,048,576 Bytes | 1,024 KB (1 MB) | Standard Apache Kafka message limit / Redis string |
MySQL VARCHAR(255) holds up to 255 chars, TEXT stores up to 64 KB (65,535 bytes), and MEDIUMTEXT holds up to 16 MB.
AWS SQS & SNS enforce a 256 KB hard limit. For larger data payloads, store payload in Amazon S3 and pass the S3 object key in your message.
Easily check text file size online. Drop .txt, .json, .csv, .xml, .log, or .sql files directly into the analyzer without any server uploads.
Need to calculate text byte size programmatically in your own applications? Here is how to accurately compute raw bytes, KB, and MB across common languages:
Using the modern standard TextEncoder or Blob API:
// Browser (UTF-8 bytes)
const bytes = new Blob([text]).size;
const kb = (bytes / 1024).toFixed(2);
// Node.js
const bytesNode = Buffer.byteLength(text, 'utf8');
Encoding string to UTF-8 bytes and reading length:
text = "Your string here"
utf8_bytes = len(text.encode('utf-8'))
kb_size = round(utf8_bytes / 1024, 2)
print(f"{utf8_bytes} Bytes ({kb_size} KB)")
Using mb_strlen with 8-bit encoding or strlen:
$text = "Your string here";
$bytes = mb_strlen($text, '8bit');
$kb = round($bytes / 1024, 2);
echo "{$bytes} Bytes ({$kb} KB)";