Developer Tool

Base64 Encoder & Decoder

Encode text or files to Base64, or decode Base64 strings back to plaintext — instantly, in your browser. No server, no upload, 100% private.

Plain Text Input 0 chars
Base64 Output 0 chars
What is Base64?
A quick reference for developers and curious minds

📦 Encoding

Base64 converts binary data into a text string using 64 printable ASCII characters. Widely used in data URLs, email attachments (MIME), and API payloads.

🔓 Decoding

Reverses the process — takes a Base64 string and returns the original binary or text. Essential for reading encoded API responses or email content.

🔗 URL-safe variant

Standard Base64 uses + and / which conflict with URLs. The URL-safe variant replaces them with - and _ and omits padding.

🖼️ Data URIs

Images can be embedded directly in HTML/CSS as data:image/png;base64,… — no extra HTTP request needed for small assets.

Frequently Asked Questions
Is this tool safe? Does it upload my data?
No data ever leaves your browser. All encoding and decoding happens entirely client-side using JavaScript's built-in btoa() and atob() functions. Nothing is sent to any server.
Is Base64 a form of encryption?
No. Base64 is encoding, not encryption. It does not provide any security — it simply transforms data into a different representation. Anyone can decode a Base64 string trivially.
Why does Base64 output look longer than the input?
Base64 represents every 3 bytes of input as 4 ASCII characters, resulting in ~33% size overhead. This is normal and expected.
What does the "=" padding at the end mean?
Padding characters (=) are added to make the Base64 output length a multiple of 4. They have no informational value and some systems omit them (URL-safe mode).
Can I encode images or binary files?
Yes! Use the "File" tab to upload any file — image, PDF, binary, or text. The tool reads it as an ArrayBuffer and produces the correct Base64 output.