Processed in your browser

Switching language reloads this page. Copy or save any inputs and results first.

06 / TEXT

Byte count

Compare sizes across character encodings.

Preview as you type
11 charsUTF-8 · Up to 200,000 characters
Inputs and results are processed only in this browser and are not saved.
How to use, examples and questions

Compare string byte counts in UTF-8, UTF-16 and Shift_JIS. Check Japanese data sizes and how encoding affects byte counts.

Byte count — how to use

  1. Paste the text whose byte count you want to check.
  2. Compare UTF-8, UTF-16 and Shift_JIS counts.
  3. If Shift_JIS shows “Not representable”, the text cannot round-trip without loss.

Input and output examples

Byte count of three Japanese characters

Input
日本語
Output
UTF-8: 9 B
UTF-16: 6 B
Shift_JIS: 6 B

Frequently asked questions

How do character and byte counts differ?

Character counts measure character units; byte counts measure data size in an encoding. “日本語” has three characters but takes nine bytes in UTF-8.

Will this match the original file size?

The BOM is excluded and displayed line breaks count as LF. Files with a BOM or CRLF will differ. This tool does not load files to inspect their size.

Can I use this for strict CP932 or SJIS-win validation?

Shift_JIS uses the encoding-japanese mapping table. Strict CP932 compatibility is not guaranteed. Also check data using the same conversion process as the destination system.

Specifications and limits

Compares UTF-8, UTF-16 (LE and BE have equal size), and Shift_JIS. Textarea line breaks are normalized to LF, so original CRLF and BOM bytes are excluded. Shift_JIS uses encoding-japanese mappings. Displays “Not representable” if conversion cannot round-trip to the original text. This does not verify strict CP932 compatibility.

Analytics and privacy

Conversion inputs and results are processed in your browser. Image URL and OGP loads connect directly to your chosen destination only when you select the corresponding button. Image, video, Markdown, HTML, CSV and TSV files are not uploaded to our servers. Self-signed certificates and signatures are generated locally; private keys are never sent to our servers or analytics. Markdown external images and HTML scripts are not loaded. The API client sends the URL, headers, body and selected files directly to the endpoint only when you select Send or its shortcut. Speed tests exchange generated test data with Cloudflare when you start a measurement. These destinations receive your IP address. We do not proxy these connections or send inputs or measurement results to analytics. Conversions are not saved automatically. Unsaved API inputs, responses, history and environments stay only in this page. Only API requests explicitly selected with Save in this browser are stored. Auth fields, secret variables, known auth headers and files are excluded; review URLs, bodies and custom headers for other secrets first. Collection exports include URLs and bodies, so review them before sharing.

When analytics is enabled, we use Google Analytics 4 to measure pages, tool names and use counts, actions such as copying or saving an image, speed test starts, completion, cancellation and errors, product link clicks, and monitoring guide and service clicks using fixed IDs. Google uses cookies and collects device and browser information. Google signals for advertising and ad personalization are disabled.

Disabling analytics stores only that preference in this browser. Analytics settings never contain your inputs.Google's privacy policy

Analytics is currently unavailable on this site.