Base64 Encode / Decode
Encode text or files to Base64, or decode Base64 strings back to text. All processing happens locally in your browser.
What is Base64?
Base64 is an encoding scheme that converts binary data into a text string using 64 printable ASCII characters. It's widely used to embed images in HTML/CSS, encode email attachments, pass binary data in JSON APIs, and store binary data in text-based formats.
What's the difference between encode and decode?
Encoding converts plain text or binary data into a Base64 string — the output is longer but safe to embed anywhere. Decoding reverses the process, converting a Base64 string back to its original form.
Can I encode images or other binary files?
Yes — use the "File → Base64" tab. You can encode any file type: images, PDFs, fonts, audio, and more. The resulting Base64 string can be embedded directly in HTML, CSS, or JSON.
Why is Base64 output longer than the input?
Base64 encoding increases size by approximately 33%. Every 3 bytes of input become 4 Base64 characters. This overhead is the tradeoff for making binary data text-safe.
Is URL-safe Base64 different?
Standard Base64 uses + and / characters, which can cause issues in URLs. URL-safe Base64 replaces them with - and _. This tool uses standard Base64. If you need URL-safe output, replace + with - and / with _ in the result.