Base64 text encoder and decoder
Encode Unicode text as standard or URL-safe Base64. Decode valid Base64 back into UTF-8 text with explicit padding and invalid-byte checks.
Count a piece of text in several precise ways. A visible character, a Unicode code point, a JavaScript string unit and a UTF-8 byte are different quantities. The tool labels each count and leaves the text unchanged.
Free to use, with no sign-in. Inputs and results stay in this page and are not sent with the form. Download a result before leaving; this tool does not save your work.
A😀é contains 7 UTF-8 bytes, 3 code points and 4 UTF-16 units.
This example uses the precomposed character é. The emoji lies outside the basic multilingual plane and needs two UTF-16 code units.
Text: A😀é
UTF-8 bytes: 1 + 4 + 2 = 7
Unicode code points: 3
UTF-16 code units: 1 + 2 + 1 = 4
Grapheme clusters: 3
Whitespace-separated words: 1
Lines: 1A decomposed e followed by a combining acute accent can look like é while containing a different code-point sequence. No Unicode normalization is performed, so these differences remain visible.
UTF-8 bytes matter for byte-oriented storage and network limits. UTF-16 code units correspond to JavaScript string length. Code points distinguish Unicode scalar values, while grapheme clusters approximate user-perceived character boundaries.
Grapheme segmentation depends on browser Unicode support and can vary with versions. Whitespace-separated word count is deliberately a simple token count, not a language-specific linguistic analysis. Lines are counted by newline boundaries; an empty string has zero lines here.
UTF-8 bytes = byte length after UTF-8 encoding
UTF-16 units = JavaScript string length
Code points = number of Unicode code points
Words = nonempty whitespace-separated tokensInput is limited to 200,000 UTF-16 units. An unpaired surrogate is rejected rather than silently encoded as a replacement character. The output reports when grapheme segmentation is unavailable in the browser.
Line endings are counted as boundaries, with CRLF treated as one break. Spaces and trailing newlines still affect bytes and string length. Token count does not estimate model tokens, SMS segments, reading time or an application-specific quota.
JavaScript length counts UTF-16 units. Some code points require a surrogate pair, so one code point occupies two units.
No. Model tokenization depends on the tokenizer. This tool reports text and encoding counts only.
No. It preserves the entered sequence. Visually similar composed and decomposed text can have different byte and code-point counts.
These references explain the formulas or formats. The worked examples above were created for this tool and checked against independent calculations or format round trips. AI-assisted development does not imply a named human expert review.
Published 2026-10-23. Examples are illustrations, not measurements of a service or claims about search rankings.
Encode Unicode text as standard or URL-safe Base64. Decode valid Base64 back into UTF-8 text with explicit padding and invalid-byte checks.
Calculate a SHA-256 digest of UTF-8 text locally. Inspect byte count and compare a supplied hexadecimal checksum without uploading the input.
Escape ampersands, angle brackets and quotes, or decode common named and numeric HTML entities once. Render results as text without a live HTML preview.
All calculators and developer tools · Source-checked guides · How Ithy checks sources