Base64 Encoder / Decoder

Convert text to Base64 or decode Base64 back to readable text, instantly and entirely in your browser.

Output will appear here.

How to use this

Choose Encode to turn regular text into Base64, or Decode to turn Base64 back into readable text. Everything runs locally in your browser using the same encoding built into JavaScript itself, so nothing you type is sent to a server. Use "Swap and use output as input" to quickly flip direction and double-check a round trip.

Where you will actually meet Base64

Base64 turns up anywhere binary data has to travel through a channel built for text:

  • JWTs. The first two segments of every JSON Web Token are Base64URL-encoded JSON, which is why the JWT decoder on this site works the way it does.
  • Email attachments. Mail is a text protocol, so attachments are MIME-encoded as Base64 before sending.
  • Data URIs. Small images or fonts embedded directly in HTML or CSS as data:image/png;base64,... strings.
  • Basic authentication. The Authorization header sends username:password as a Base64 string.
  • API payloads that carry files, signatures or encrypted blobs inside JSON, where raw bytes cannot go.

Base64 is not encryption

This is the single most important thing to know about it: Base64 is an encoding, not a cipher. Anyone who receives a Base64 string can decode it instantly, with no key, which is why the decoder above exists. Never use Base64 on its own to protect a password, a token or anything private. Encryption scrambles data so it needs a key to read; hashing (like the SHA tools on this site) is one-way and cannot be reversed at all. Base64 is neither: it just re-spells the same bytes in a text-safe alphabet.

Two details worth knowing: the encoded output is about a third longer than the input, because every three bytes become four characters; and the = signs at the end are padding that rounds the length up. The URL-safe variant swaps two characters (+ becomes - and / becomes_) so the result can sit inside a link or a token without escaping.

Frequently asked questions

Why is the encoded text longer than the original?

Base64 stores every three bytes of input as four text characters, so the output is about a third larger, plus up to two padding characters. That overhead is the price of sending binary data through text-only channels.

What do the = signs at the end of a Base64 string mean?

They are padding. Base64 output must be a multiple of four characters, so one or two = signs are added when the input length does not divide evenly by three. They carry no data and some URL-safe variants omit them.

How do I encode or decode Base64?

Choose Encode to turn regular text into Base64, or Decode to turn Base64 back into readable text. Use the swap button to send the output back in as input and double-check a round trip.

Is Base64 a way to hide or encrypt data?

No. Base64 is only an encoding. Anyone can decode it, so do not use it to protect passwords or secrets.

Is my text sent to a server?

No. The tool uses the encoding built into JavaScript and runs locally in your browser.