Base64 Generator

Type or paste text, choose Encode or Decode, and get the Base64 result with a copy button. Handles UTF-8 text such as accents and emoji.

The Base64 Generator turns any text you paste into its Base64 form, and turns a Base64 string back into text. Pick Encode or Decode from the dropdown, press the button, and the result appears on a card with a copy icon. The conversion runs in your browser with UTF-8 handling, so accented characters, non-Latin scripts and emoji encode and decode correctly instead of coming back as question marks.

Using it

  • Encode: paste plain text (a string, a JSON snippet, a line of config, an API key) and get the Base64 string. Line breaks in the input are encoded too, so the output represents exactly what you pasted.
  • Decode: paste a Base64 string and get the original text. Padding with = is accepted. Base64url strings (the variant with - and _ instead of + and /, used in JWTs) need those two characters swapped back before decoding here.

Decode expects a valid Base64 string. If you paste something that is not Base64, or a string that decodes to binary rather than text, the result will be garbage or the decode will fail, so use it for text you know was Base64-encoded. There is no file upload; this is for strings.

Sample conversions

TextBase64
HelloSGVsbG8=
Hello, World!SGVsbG8sIFdvcmxkIQ==
user:passworddXNlcjpwYXNzd29yZA==
{"ok":true}eyJvayI6dHJ1ZX0=

What Base64 is, and what it is not

Base64 is an encoding, not encryption and not a hash. It takes bytes three at a time and writes them as four characters from a 64-character alphabet: A to Z, a to z, 0 to 9, plus + and /. When the input length is not a multiple of three, one or two = signs pad the end. The output is always about 33 percent longer than the input. Because the alphabet is safe in places that choke on raw bytes, Base64 is how binary data travels inside text: email attachments, data: URLs for inline images, the credentials in an HTTP Basic Authorization header (Basic dXNlcjpwYXNzd29yZA==), and the three segments of a JSON Web Token.

Anyone can reverse it in one step, which is why "Base64 hash" is a contradiction. If you need a one-way fingerprint of some text, use the SHA256 Hash Generator, the SHA512 Hash Generator or, for legacy checksums, the MD5 Hash Generator. And if you were searching for a "random Base64 generator" to get a random-looking token, generate a random string first with the Random Password Generator and encode that; Base64 by itself adds no randomness.

Where developers reach for it

  • Checking a Basic auth header. Decode the string after Basic to confirm which username:password a client is sending.
  • Reading a JWT payload. Split the token on the dots, swap -/_ for +//, and decode the middle segment to see the claims.
  • Embedding small config values. Kubernetes Secrets, some environment-variable conventions and many CI systems expect Base64-encoded values; encode here and paste.
  • Debugging encoding problems. Encode a string with an accent, decode it again and compare. If it round-trips here but not in your code, your code is not treating the bytes as UTF-8.

The rest of the encoding and hashing tools live under all developer & test data tools.

Frequently asked questions

Is Base64 secure?

No. It hides nothing; anyone can decode it instantly. Use it to make data safe for text-only channels, never to protect it. For protection you need encryption, and for integrity checks you need a hash such as SHA-256.

Why does my Base64 output end with = or ==?

Padding. Base64 works in groups of three input bytes. If the last group has only one or two bytes, the encoder adds two or one = signs so the output length is a multiple of four.

Can I encode a file or an image here?

Not directly; the tool takes text only. To make a data: URL for an image you need a tool that reads the file's bytes, then Base64-encodes them.

Does it handle emoji and non-English text?

Yes. The text is converted to UTF-8 bytes before encoding and back after decoding, so Japanese, Arabic, accented letters and emoji survive the round trip.