Base64 Encode and Decode

Turn text into Base64 or decode a Base64 string back into readable text. Handles emoji and every language correctly.

How to use the Base64 tool

  1. Choose Encode to turn text into Base64, or Decode to turn Base64 back into text.
  2. Paste your text or Base64 string into the input box.
  3. The result appears right away. Copy it with one click.

When decoding, you do not need to worry about line breaks, missing padding or URL-safe characters. The tool cleans those up for you.

Example

Hello, world! encodes to SGVsbG8sIHdvcmxkIQ==

Where you will run into Base64

A note on UTF-8

The browser's built in btoa() function fails on anything outside basic Latin letters, which is why some online encoders break on emoji or non English text. This tool converts the text to UTF-8 bytes first, so "café" and "😀" encode the same way they would in Python, PHP or a command line tool.

Frequently asked questions

Is Base64 encryption?

No. Base64 is an encoding, not encryption. Anyone can decode it in a second, so never use it to hide passwords or secrets.

Why is Base64 longer than the original?

Base64 uses 4 characters to represent every 3 bytes, so the output is about 33 percent bigger than the input.

What is URL-safe Base64?

Normal Base64 uses + and /, which have special meanings in URLs. URL-safe Base64 swaps them for - and _ and usually drops the = padding at the end. It is used in JWT tokens and in links.

Why do I get an error that the result is binary?

The string decodes fine, but the result is not text. It might be an image, PDF or compressed file. This tool only shows text results.