🔢 Base64 Encoder & Decoder

Encode text or files to Base64, or decode Base64 strings back to readable text. Supports URL-safe mode. Everything runs in your browser.

URL-safe Mode File Support No Upload
Text Input
Or encode a file:
Base64 Output

FAQ

What is Base64 encoding?

Base64 converts binary or text data into a string of 64 printable ASCII characters. It is commonly used to embed images in HTML/CSS (data:image/png;base64,…), encode API credentials in HTTP headers, and safely transmit binary data over text-only channels like JSON or email.

What is URL-safe Base64?

Standard Base64 uses + and / which have special meanings in URLs. URL-safe Base64 replaces + with - and / with _, making the output safe to include directly in URLs, filenames, and HTTP query parameters without percent-encoding.

Is my data sent to a server?

No. Encoding uses the browser's btoa() API and the FileReader API for files. Decoding uses atob(). Everything runs locally on your device.

Why does Base64 encoded output look longer than the input?

Base64 encodes every 3 bytes of input as 4 ASCII characters, resulting in approximately 33% size overhead. This is the inherent trade-off for representing binary data in a text-safe format.

Can I encode binary files (images, PDFs)?

Yes — use the file input in the Encode tab. The file is read by the browser's FileReader API and converted to Base64. Large files may take a moment to process.