Base64 Converter

Choose encode or decode

How to encode and decode Base64

Base64 represents arbitrary bytes using only 64 printable characters (A–Z, a–z, 0–9, + and /) plus = for padding. It exists so that binary data — images, archives, cryptographic keys — can travel through channels that only accept text, such as email bodies, JSON payloads, HTML attributes and configuration files. Base64 is an encoding, not encryption: anyone can decode it, so it never makes data secret.

This tool handles both directions. To encode, paste text into the input box or pick a file, and the Base64 string appears immediately. To decode, paste a Base64 string and the original text is restored. If the string is malformed — a stray line break, a missing = at the end — you get a clear error instead of silently wrong output.

Everything runs in your browser with JavaScript; nothing you paste or upload is sent to a server. That makes it safe for values you would hesitate to paste into a random online converter, such as configuration entries containing API keys or internal documents. No installation and no account are needed, and it works the same on a phone.

Frequently asked questions

Is Base64 a form of encryption?
No. Base64 is a reversible encoding that anyone can decode. It should never be used to hide passwords or secrets.
Can I encode image files?
Yes. Choose a file and any binary, including images, is converted to a Base64 string — useful for embedding a data URI in CSS or HTML.
Why do I get "Invalid Base64 string"?
Usually because line breaks or spaces were copied in, or the trailing = padding is missing. Copy the original string again and retry.
Is my data uploaded anywhere?
No. Encoding and decoding happen entirely inside your browser, and no data is sent to any server.

Related tools