Base64 Encoder/Decoder
Encode and decode Base64 strings
How to Use Base64 Encoder/Decoder
- 1
To encode: type or paste your text into the input and click Encode.
- 2
To decode: paste a Base64 string and click Decode.
- 3
Copy the result from the output field.
- 4
Use the file option to encode an entire file as a Base64 string.
About Base64 Encoder/Decoder
Encode and decode Base64 strings and files online. Supports URL-safe Base64. Free developer tool.
Best Use Cases
- •Encoding image files to Base64 for embedding directly in HTML or CSS
- •Decoding Base64 strings from API responses to inspect the original data
- •Encoding credentials for HTTP Basic Authentication headers
- •Converting binary data to Base64 for safe transmission in JSON payloads
- •Decoding Base64-encoded email attachments to read the content
Examples
Inline image
Paste a small image file to get a Base64 data URI you can embed directly in an HTML img tag.
API auth
Encode username:password to get the Base64 string for an Authorization: Basic header.
Debug payload
Paste a Base64 string from an API response. Decode it to see the original JSON or text content.
Common Mistakes to Avoid
- !Confusing Base64 encoding with encryption, which it is not
- !Not using URL-safe Base64 variant when encoding for URLs or filenames
- !Encoding large files to Base64, which increases size by roughly 33%
Limitations
- –Base64 increases data size by approximately 33% compared to the original
- –Not suitable for encoding very large files due to browser memory limits
- –URL-safe and standard Base64 use different characters and are not interchangeable
Frequently Asked Questions
What is Base64 encoding?
Base64 converts binary data to ASCII text using 64 printable characters. It's used for embedding images in HTML/CSS, API auth, and email attachments.
Is Base64 the same as encryption?
No. Base64 is encoding, not encryption. Anyone can decode it. Don't use it to protect sensitive data.