Ithy

Base64 encoder and decoder for UTF-8 text

Encode text as UTF-8 bytes, then convert those bytes to standard Base64 or its URL-safe alphabet. Decode in the reverse direction. This text tool rejects decoded bytes that are not valid UTF-8 instead of replacing them with misleading characters.

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.

Enter text or data

Worked result

Hello, 世界 encodes to SGVsbG8sIOS4lueVjA==.

  1. Encode the original string as UTF-8 bytes.
  2. Group those bytes into Base64 symbols.
  3. Decode the symbols and validate UTF-8 to recover the original text.

Encode Unicode text without losing characters

The string Hello, 世界 contains seven ASCII characters and two Chinese characters. UTF-8 uses 13 bytes for this particular string.

Text: Hello, 世界
UTF-8 bytes: 13
Standard Base64: SGVsbG8sIOS4lueVjA==
URL-safe, unpadded: SGVsbG8sIOS4lueVjA

The Base64 result is readable by anyone who decodes it. It does not hide a secret or provide encryption, a digital signature or tamper detection.

Bytes first, then an encoding alphabet

Base64 maps groups of three bytes into four alphabet characters, adding padding for an incomplete group in the standard padded representation. The URL-safe variant substitutes two characters and commonly omits padding.

Unicode text must first become bytes in a specified encoding. Applying a byte-oriented encoder directly to arbitrary JavaScript characters can fail or misrepresent them. This tool consistently uses UTF-8 for text.

Text → UTF-8 bytes → Base64 symbols
Base64 symbols → bytes → strict UTF-8 text
Standard alphabet uses + and /; URL-safe uses - and _.

Input limits and common mistakes

The tool supports text, not arbitrary binary file decoding. Invalid UTF-8, invalid alphabet characters, misplaced padding and noncanonical leftover bits are rejected. ASCII whitespace in an encoded input is ignored.

Text input is limited to 200,000 characters. URL-safe output omits padding; the decoder accepts valid padded or unpadded input in the selected alphabet. Empty text is valid. Never treat an encoded credential as a safely encrypted credential.

Questions about base64 text encoder and decoder

Is Base64 encryption?

No. It is reversible encoding with no secret key. Anyone with the encoded text can recover the original bytes.

Why might decoding fail?

The characters or padding may be invalid, or the decoded bytes may be a binary file rather than valid UTF-8 text.

Why does Unicode need a byte encoding?

Base64 works on bytes. UTF-8 provides a consistent byte sequence for Unicode text such as 世界 or emoji.

Sources and verification

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.

  • MDN: Base64 — Byte-oriented encoding, alphabets, padding and Unicode considerations.

Published 2026-10-23. Examples are illustrations, not measurements of a service or claims about search rankings.

Related tools

URL encode and decode

Percent-encode a URL component or decode UTF-8 percent escapes. Choose literal-plus or form-plus interpretation explicitly.

Text and UTF-8 byte counter

Count UTF-8 bytes, Unicode code points, UTF-16 units, grapheme clusters, lines and whitespace-separated words. Inspect the difference with emoji.

SHA-256 text checksum

Calculate a SHA-256 digest of UTF-8 text locally. Inspect byte count and compare a supplied hexadecimal checksum without uploading the input.

All calculators and developer tools · Source-checked guides · How Ithy checks sources