Encode / Decode

Base64 Encode / Decode

Encode any text or binary data to Base64 and decode Base64 strings back to plain text — supports both standard and URL-safe Base64.

Open Base64 Tool →
Looks like you're using an ad blocker. Devbin is free — ads help keep it running.

What is Base64?

Base64 is an encoding scheme that converts binary data into a text format using only 64 ASCII characters (A–Z, a–z, 0–9, +, /). This makes binary data safe to transmit over channels that only support text, such as email or JSON fields.

Important: Base64 is not encryption. It is trivially reversible and provides zero security. Use it for encoding, not protecting data.

How to Use It

1

Open the tool

Go to Encode / Decode and scroll to the Base64 section.

2

Choose Standard or URL-safe

Standard uses + and /. URL-safe replaces them with - and _ — required for use in URLs and JWT tokens.

3

Select Encode or Decode

Choose Encode to convert text → Base64, or Decode to convert Base64 → text.

4

Paste and copy

Paste your input text and click Copy to copy the result to your clipboard.

Common Use Cases

Base64 is used in many everyday developer tasks: encoding credentials for HTTP Basic Authentication headers (Authorization: Basic dXNlcjpwYXNz), embedding small images as data URIs in CSS or HTML, encoding binary data for inclusion in JSON payloads, and inspecting the payload of JWT tokens (which are Base64url-encoded).

Pro Tips

💡Base64-encoded data is approximately 33% larger than the original binary. Avoid Base64-encoding large files.
💡The = padding at the end of Base64 strings is normal — it pads the output to a multiple of 4 characters.
💡In Python: import base64; base64.b64encode(b"hello"). In JavaScript: btoa("hello") for encoding, atob("aGVsbG8=") for decoding.
💡JWT tokens use URL-safe Base64 (no padding). If decoding a JWT payload manually, use URL-safe mode and add padding (=) if needed.

Frequently Asked Questions

Is Base64 encryption?
No. Base64 is encoding — it is trivially reversible and provides no security protection. Anyone can decode a Base64 string instantly.
What's the difference between Standard and URL-safe Base64?
Standard uses + and / which are reserved URL characters. URL-safe replaces them with - and _, making it safe to include in URLs and JWT tokens without percent-encoding.
Why does output end in =?
The = characters are padding to make the output length a multiple of 4, as required by the Base64 specification.
Can I encode images with this tool?
This tool encodes text input. To encode image files as Base64 data URIs, use the Image to Base64 tool in the Images & Files section.

Ready to encode?

Open the Base64 tool and encode or decode any text instantly — no login, no limits.

Open Base64 Tool →