Base64 Encoder/Decoder
Encode any text to Base64 or decode Base64 strings back to plain text — instantly, in your browser.
How to use the Base64 Encoder/Decoder
Convert plain text to Base64 for safe transmission in URLs and headers, or decode Base64 strings back to their original content — all in one click.
- 1
Type or paste your input
To encode: paste the plain text you want to convert. To decode: paste the Base64 string you received. The tool automatically detects what you intend based on which button you click.
- 2
Click Encode or Decode
Click Encode to Base64 to convert plain text to a Base64 string. Click Decode Base64 to reverse the process and recover the original text. The result appears in the output box immediately.
- 3
Copy the output
Click Copy Output to copy the result to your clipboard. You can then paste it into an API header, a data URI, an email, or wherever Base64 is required.
Frequently asked questions
What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that converts binary or text data into a string of 64 printable ASCII characters (A–Z, a–z, 0–9, +, /, and = for padding). It was designed to safely carry data through systems that handle only ASCII text, such as email protocols (SMTP) and HTTP headers.
What is Base64 used for?
Common use cases include: embedding images or fonts directly in HTML/CSS as data: URIs, encoding binary attachments in emails (MIME), passing credentials in HTTP Basic Auth headers (Authorization: Basic <base64>), storing binary data in JSON (which only supports text), and encoding cryptographic keys or JWT tokens for safe transmission.
Is Base64 a form of encryption?
No. Base64 is an encoding scheme, not encryption. It is fully reversible by anyone without a key — anyone who sees a Base64 string can decode it instantly. Do not use Base64 to protect sensitive data. Use it only to safely transport data through text-based channels. For real security, use AES or similar encryption algorithms.
Why does Base64 output end with = or ==?
= or ==?Base64 encodes every 3 bytes of input into 4 characters. When the input length is not a multiple of 3, padding characters (=) are added to make the output length a multiple of 4. One trailing = means the input had one extra byte; two trailing == means it had two extra bytes. The = characters are just alignment padding and carry no data.
What is URL-safe Base64?
Standard Base64 uses + and /, which have special meaning in URLs. URL-safe Base64 replaces these with - and _ so the encoded string can be used in a URL without percent-encoding. JWT tokens use URL-safe Base64 without padding. This tool uses standard Base64; to get URL-safe output, replace + with - and / with _ in the result.
How much larger is Base64 output compared to the input?
Base64 increases data size by approximately 33% — every 3 bytes of input becomes 4 characters of output. A 1 MB file encodes to roughly 1.37 MB of Base64. This is the trade-off for text-safe transport. For very large binary files, embedding as Base64 is inefficient; use binary-safe protocols like multipart form data instead.
Can this tool decode binary data like images?
This tool works with text input only. If you paste a Base64-encoded image and decode it, the output will be the raw binary data as a text string — it won't display as an image. To embed a Base64-encoded image, prepend the appropriate data URI prefix, for example: data:image/png;base64,<encoded-string>.