Free developer tools

Base64 Encode & Decode.

Convert text and files to and from Base64 — UTF-8 aware, with URL-safe support. Everything stays in your browser.

Developed and hosted in the EU
Base64 Converter
Encode & decode · UTF-8 · files
Runs entirely in your browser
The result appears here.

Conversion happens on your device — no uploads, no storage, no logging. Works offline once the page is loaded.

What is Base64?

Base64 is a way to represent arbitrary binary data using only 64 safe ASCII characters (A–Z a–z 0–9 + /). Every 3 bytes of input become 4 output characters, which makes the result about 33% larger — but safe to embed in text-only places like JSON, XML, e-mails, or data URIs. It is an encoding, not encryption: anyone can reverse it instantly.

How “Man” becomes “TWFu”

The three bytes of Man (77, 97, 110) form 24 bits, which are re-grouped into four 6-bit numbers — each an index into the Base64 alphabet:

TextMan
Bits01001101 01100001 01101110
6-bit groups010011 010110 000101 101110
Base64T W F u

Where Base64 is used

  • Data URIs — inline images and fonts in HTML/CSS (data:image/png;base64,…).
  • JWTs — header and payload of JSON Web Tokens are Base64URL-encoded (try our JWT decoder).
  • E-mail attachments — MIME encodes binary attachments as Base64 with 76-character lines.
  • APIs — binary payloads in JSON, and HTTP Basic authentication credentials.

Base64 vs. Base64URL

Standard Base64 uses + and / — both problematic inside URLs. The URL-safe alphabet (RFC 4648 §5) swaps them for - and _ and typically omits the = padding. Use the URL-safe option whenever the encoded value ends up in a URL, filename, or JWT. Decoding here accepts both variants automatically.

Base64 in your code

For anything beyond a quick conversion, encode directly in your language of choice — mind the UTF-8 handling in JavaScript:

JavaScript
UTF-8 safe
// Encode (UTF-8 safe)
const bytes = new TextEncoder().encode("Hellö wörld");
const b64 = btoa(String.fromCharCode(...bytes));

// Decode
const decoded = new TextDecoder().decode(
  Uint8Array.from(atob(b64), (c) => c.charCodeAt(0))
);
Python
base64 module
import base64

b64 = base64.b64encode("Hellö wörld".encode()).decode()
text = base64.b64decode(b64).decode()

# URL-safe variant
url_b64 = base64.urlsafe_b64encode(b"data").decode()

Frequently asked questions

Is Base64 encryption?
No. Base64 is an encoding, not encryption — it only changes how data is represented, not who can read it. Anyone can decode a Base64 string instantly, with no key required. Never use Base64 to protect secrets.
Is it safe to paste sensitive data into this tool?
Encoding and decoding happen entirely in your browser — nothing you enter is sent to a server, stored, or logged. You can verify this in your browser's network tab, or use the tool offline. That said, be generally careful with production secrets in any browser tab.
What does the = at the end of a Base64 string mean?
That is padding. Base64 turns every 3 bytes into 4 characters; when the input length is not a multiple of 3, the output is padded with one or two = characters to keep the length a multiple of 4. The URL-safe variant commonly omits the padding.
Why is Base64 larger than the original data?
Base64 represents every 3 bytes of input as 4 ASCII characters, so encoded data is about 33% larger. That is the price of making arbitrary binary data safe to transport in text-only channels.
What is the difference between Base64 and Base64URL?
Standard Base64 uses + and /, which have special meanings in URLs. The URL-safe variant (Base64URL, RFC 4648 §5) replaces + with - and / with _, and usually drops the = padding. JWTs, for example, use Base64URL. The decoder on this page accepts both automatically.
Why does my decoded text look garbled?
A Base64 string carries no information about the text encoding of the underlying bytes. This tool decodes text as UTF-8, which covers most modern data. If the original text used a legacy encoding like ISO-8859-1 or Windows-1252, special characters can look wrong — or the data may simply be binary, in which case you can download it as a file instead.
Can I encode or decode files?
Yes. In encode mode you can pick a file and get its Base64 representation; in decode mode you can download the decoded bytes as a file. Files are processed locally in your browser and are never uploaded anywhere.

Free tools from a European software company.

  • Runs in your browser
  • Made & hosted in the EU
  • No account needed