Base64 Encoder & Decoder

Encode text to Base64 or decode Base64 strings instantly. Drag a file to generate a data URI. 100% private โ€” nothing leaves your browser.

Plain Text
Base64 Output
๐Ÿ“
Drag & drop a file here
or click to browse ยท Images, documents, any file type
File Name
โ€”
MIME Type
โ€”
Original Size
โ€”
Data URI Length
โ€”
Base64 Data URI
๐Ÿ”’ 100% Client-Side
โšก Real-Time Conversion
๐Ÿšซ No Server Upload

How to Use the Base64 Encoder & Decoder

Select the "Encode" tab to turn plain text into a Base64 string, or the "Decode" tab to turn a Base64 string back into readable text. Type or paste your input, and the result updates instantly โ€” no submit button needed.

To encode an image or small file as a Base64 data URI (handy for embedding icons directly in CSS or HTML without an extra HTTP request), switch to the "File" tab and drag your file in. The tool shows the resulting data URI and its character length, so you can judge whether inlining it is worth the payload size.

Because encoding and decoding both happen locally in your browser using native JavaScript functions, nothing you paste is ever sent to a server, which makes this safe to use with tokens, credentials, or private data while debugging APIs.

Common Use Cases

Frequently Asked Questions

Related Tools

What is Base64 encoding used for?

Base64 converts binary data (like images) into an ASCII string format. It is commonly used to safely transmit data over text-based protocols like HTTP or email.

Is Base64 a type of encryption?

No, Base64 is strictly a data encoding format. It provides zero cryptographic security and can be easily decoded by anyone.

Why do Base64 strings end with an equals sign (=)?

The equals sign is used as padding. Base64 processes data in 24-bit chunks; if the input data doesn't divide evenly, padding is added to complete the string.

Can Base64 reduce file size?

No, encoding data into Base64 actually increases the size of the original data by about 33% because it uses 4 text characters to represent every 3 bytes.

How do you decode Base64?

You can decode Base64 using online decoders or native programming functions (like atob() in JavaScript or base64_decode in PHP) to revert it to its original format.