~/devtools / base64
tool::base64

Base64
Encoder

Encode text to Base64 or decode Base64 back to text. Converts automatically as you type.

ad · 728×90
// about base64
Base64 encodes binary data as ASCII text using 64 characters. Common uses: data URLs, JWT tokens, email attachments.
Text
Base64
ad · 300×250
// about this tool

What is Base64 Encoding?

Base64 is an encoding scheme that converts binary data into 64 printable ASCII characters. It was designed to safely transmit binary data over channels that only support text — such as email, web APIs, and data URLs.

Base64 is not encryption. Anyone can decode the resulting string back to its original form. JWT token headers and payloads, HTML inline images (data:image/png;base64,...), and HTTP Basic Auth headers all use Base64.

This tool converts between plain text and Base64 in real time, in both directions. Just paste and get the result instantly. A copy button lets you grab the output without any extra steps.

Use Cases
  • Encode images as Base64 to use as CSS data URIs
  • Generate HTTP Basic Auth headers (encode username:password)
  • Decode JWT header and payload to inspect their contents
  • Understand and debug email attachment encoding
  • Safely include binary data in JSON fields
FAQ
Q. Is Base64 the same as encryption?
No. Base64 is encoding — it transforms the format of data, not hides it. Anyone can decode it back to the original, so never rely on Base64 alone to protect sensitive information.
Q. Does encoding change the data size?
Yes. Base64-encoded data is about 33% larger than the original. This is because 3 bytes are converted into 4 Base64 characters. An = padding character is appended when the input length is not a multiple of 3.
Q. How does URL-safe Base64 differ from standard Base64?
Standard Base64 uses + and / characters, which have special meaning in URLs. URL-safe Base64 replaces + with - and / with _, making it safe to use in URL query parameters. JWT tokens use URL-safe Base64.
// related tools
%
URL Encoder
Encode or decode URL strings with encodeURIComponent or encodeURI.
\u
Unicode Converter
Bidirectional text ↔ \uXXXX unicode escape conversion. Supports Java .properties native2ascii format.
<
HTML Entity Encoder
Encode HTML special characters into entities or decode them. & → & and more.
{}
JSON Formatter
Format, validate, and minify JSON. Supports nested structures and diff comparison.