Converters

Base64 Encoder & Decoder

Encode & Decode

Encode or Decode Text

Quickly encode text to Base64 format or decode Base64 strings back to readable text.

Tool features

Comprehensive Base64 encoding and decoding with instant results
4 features

Encode & Decode

Quickly encode text to Base64 or decode Base64 strings back to text

Secure Encoding

Safe and reliable Base64 encoding/decoding for data transmission

Fast Processing

Instant encoding and decoding with real-time results

File Support

Upload files directly or paste text for encoding/decoding

What is Base64 & how it works

Carrying binary data through text-only systems

Base64 is an encoding that turns any binary data into text using 64 safe characters (A–Z, a–z, 0–9, + and /), with = padding at the end. It lets you carry bytes through systems built for text, such as email bodies, JSON, data URLs and HTTP headers.

Every 3 bytes become 4 characters, so encoded data is about 33% larger. Base64 is not encryption: anyone can decode it, so it hides nothing. The URL-safe variant (Base64url) swaps + and / for - and _, as used in JWTs.

Encode
Bytes or text in, Base64 text out; roughly 4 characters per 3 bytes.
Decode
Base64 text back to the original bytes or UTF-8 text.
Padding (=)
Fills the last block so the length is a multiple of four.

How to use this tool

Encode or decode Base64 in four steps
1
Choose text or file
Use Text Input to paste a string, or File Upload to encode a file.
2
Pick encode or decode
Encode turns input into Base64; decode turns Base64 back into text or bytes.
3
Convert
Run the conversion and check the output and its size.
4
Copy or download
Copy the result to the clipboard or save it as a file.

Frequently asked questions

Common questions about Base64
5 Q&A

No. Base64 is a reversible encoding with no key; anyone can decode it. Never use it to protect passwords or secrets.

Base64 represents every 3 bytes with 4 characters, so output is about a third larger, plus up to two padding characters.

The original data was probably binary (an image, a compressed file) rather than text. For images use the Base64 to Image tool; for other binary data decode it on the command line with base64 -d.

Base64url replaces + with - and / with _, and often drops the = padding, so the result is safe in URLs and filenames. JWTs use Base64url.

On Linux or macOS run base64 file.bin to encode and base64 -d file.txt to decode (-D on older macOS). In PowerShell use [Convert]::ToBase64String().