Base64 Encode / Decode

Base64 is a binary-to-text encoding scheme that uses 64 printable ASCII characters. It is widely used in web development for embedding images in HTML/CSS, transmitting binary data in JSON and XML, working with email attachments, and many other scenarios.

How Base64 Works The Base64 algorithm splits input bytes into groups of 6 bits and replaces each group with a character from the alphabet A-Z, a-z, 0-9, + and /. As a result, the data size increases by approximately 33%, but it can be safely transmitted over text-based protocols. Our tool fully supports UTF-8 encoding, correctly handling Cyrillic and other Unicode characters.

Free online tool for Base64 encoding and decoding. Base64 is a binary-to-text encoding scheme widely used in web development, email, and data transmission over text-based protocols.

Base64 encoding is essential when embedding images in HTML/CSS via data URIs, transmitting binary data in JSON, working with MIME attachments in email, and in many other scenarios. Our tool fully supports UTF-8 encoding, allowing correct processing of Cyrillic, Chinese characters, and other Unicode symbols.

Simply paste text in the left field and click "Encode", or paste a Base64 string in the right field and click "Decode". Results can be copied to the clipboard with a single click. All computations are performed locally in your browser.

How to use it

  1. Paste text into the left field and press Encode — the Base64 string appears on the right. For the reverse, paste Base64 on the right and press Decode.
  2. Non-Latin text and emoji are handled correctly: the text is converted to UTF-8 bytes first, then encoded.
  3. Copy the result with one button.

When it helps

  • Authorization header: build the value for Basic auth from login:password.
  • Data URIs: embed a small image or font directly in HTML or CSS.
  • Debugging APIs and JWTs: read the contents of a token or a field passed as Base64.
  • Configs and secrets: encode a value for a Kubernetes Secret or an environment variable.

Frequently asked questions

Is Base64 encryption?

No. It is reversible encoding with no key: anyone can decode the string. To protect data you need encryption.

Why is the encoded string longer than the original?

Every 3 bytes become 4 characters, so the size grows by about 33%. The “=” signs at the end pad the string to a multiple of four.

What is base64url?

A variant for URLs and JWTs where “+” and “/” are replaced with “-” and “_” and the “=” padding is usually dropped. The decoder understands both.

Related tools