Base64 Encoder / Decoder

Encode and decode Base64, Hex, URL, HTML and more

If you're looking to encrypt/decrypt text with a password, try our Encrypt/Decrypt Text.

If you're looking to generate hash of any text, try our Hash Generator.

Text to encode
Base64 output

How it works

Paste text or encoded data into the input field. Choose Encode or Decode, then select your encoding format from the dropdown. The output updates instantly.

What is Base64?

Base64 encodes arbitrary binary data as a string of 64 printable ASCII characters (A-Z, a-z, 0-9, +, /). Every 3 bytes of input become 4 characters of output, making encoded data about 33% larger than the original.

It was formalised in the early 1980s to solve a specific problem: early email protocols (SMTP) were designed to carry 7-bit ASCII text only, not raw binary. Sending an image or a file attachment directly would corrupt the data as it passed through mail servers that stripped the 8th bit. Base64 sidestepped this by representing any binary as plain text that those servers could safely relay. It was formally specified in RFC 989 (1987) and later RFC 2045 (1996) as part of the MIME standard that gave email attachments their modern form.

Today it is used wherever binary data needs to travel through a text-only channel: data URLs in HTML/CSS (src="data:image/png;base64,..."), HTTP Basic Auth headers, JSON Web Tokens, and X.509 certificates (the PEM format is Base64 wrapped in header lines). The encoder here handles Unicode by converting to UTF-8 bytes first, then encoding those bytes.

Other encodings

The dropdown includes: Base64 URL-safe (for URLs), Base32, Hex, URL Encode, HTML Entities, and ROT-13.