🔐
Base64 Encoder / Decoder
Encode text or decode Base64 — URL-safe mode supported
Ctrl+Enter = encode
Result appears here

Base64 Encoder

Free online Base64 encoder and decoder. Convert plain text to Base64 or decode Base64 strings back to readable text. 100% client-side — nothing is sent to any server.

Free No login 100% browser-based No data sent to servers

Try these next

What is a Base64 Encoder?

Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It is one of the most widely used encodings on the web — every JWT token is Base64-encoded, email attachments travel as Base64, and data URIs embed images as Base64 strings.

This tool encodes plain text or decodes Base64 strings entirely in your browser. Nothing is sent to any server. It supports standard Base64 and URL-safe Base64 (which replaces + with - and / with _ for safe use in URLs and filenames).

How to encode and decode Base64

1. Select Encode or Decode mode using the tabs. 2. Paste your text into the input box. 3. The output updates automatically. 4. Click Copy to copy the result. For URL-safe Base64 (used in JWTs), the output uses - instead of + and _ instead of /.

When to use Base64

Use Base64 when you need to transmit binary data (images, files) through a text-only channel like JSON, HTML attributes, CSS, or email. Avoid it for large files — the 33% size increase is significant. For images specifically, use the Image to Base64 tool which handles file uploads directly.

What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that converts binary data into ASCII characters. It uses 64 printable characters (A–Z, a–z, 0–9, +, /) and is widely used in email, JWTs, and embedding binary data in JSON or HTML.
Is Base64 a form of encryption?
No. Base64 is encoding, not encryption. It provides no security — anyone can decode it instantly. For security, use proper encryption like AES.
Why does my Base64 string end in = or ==?
The = characters are padding. Base64 encodes 3 bytes into 4 characters. When the input isn't a multiple of 3 bytes, = padding characters are added to complete the group.
What is Base64 URL encoding?
Base64 URL encoding is a variant of standard Base64 that replaces + with - and / with _, making the output safe for URLs and filenames without percent-encoding. JWTs use Base64url. The padding character = is often omitted. Always check which variant an API expects.
Why is Base64 used in JWTs?
JWT (JSON Web Token) header and payload are Base64url-encoded so they can be safely transmitted in HTTP headers and URLs without special character issues. The signature is also Base64url-encoded. Base64url is chosen over regular Base64 because + and / have special meaning in URLs.
How do I decode Base64 in different languages?
Python: base64.b64decode(s). JavaScript: atob(s) for browser, Buffer.from(s, "base64") for Node.js. PHP: base64_decode($s). Java: Base64.getDecoder().decode(s). Go: base64.StdEncoding.DecodeString(s). All standard libraries have built-in Base64 support.
Does Base64 work for binary files like images?
Yes, but use the "Image to Base64" tool for images, which handles file reading automatically. Base64 increases file size by approximately 33% (every 3 bytes becomes 4 characters). For large binaries, this overhead can be significant — only use Base64 embedding when necessary (e.g. inline email attachments, CSS data URIs).

Also available as

✓ Copied!