Developer Tools

Base64 Encoder & Decoder

Encode text to Base64 or decode Base64 strings. Supports Unicode and image encoding.

Runs in your browser

Input size

Output size

Size ratio

Encode Image to Base64

Upload an image to get its Base64 data URI for embedding in HTML/CSS.

Preview

Preview

Data URI

What is the Base64 Tool?

Base64 is a binary-to-text encoding scheme that converts binary data (images, files, arbitrary bytes) into a string of ASCII characters using 64 printable characters. It is widely used in web development, email systems, and APIs to safely transmit binary data over channels that only handle text.

Common use cases include encoding images for embedding directly into HTML or CSS using data URIs, encoding API credentials in HTTP Basic Authentication headers (Authorization: Basic dXNlcjpwYXNz), encoding JSON payloads in JWTs, and attaching binary files in email via MIME encoding.

Base64 increases data size by approximately 33%, so it is not suitable for large file transfers - use it for small payloads, tokens, and credentials. Pair it with the URL Encoder for URL-safe Base64 encoding.

How to use the Base64 Tool

Switch between Encode and Decode mode using the toggle. Paste your plain text or binary string into the input and the result appears instantly in the output panel. For image encoding, use the file picker to select an image and get the Base64 data URI output that you can paste directly into an img src attribute or CSS background-image.

Click Copy to copy the result to your clipboard. All processing happens in your browser - no data is sent to any server.

Frequently asked questions

Base64 is a binary-to-text encoding that represents binary data using 64 printable ASCII characters. It is commonly used to embed images in CSS, send binary payloads over text-only protocols and store certificates.
No. Base64 is not encryption - anyone can decode it. Use it for transport, not for protecting secrets.
About 33% larger. Every three input bytes become four output characters, so a 1MB binary file becomes roughly 1.33MB of Base64 text.
Yes, the tool can encode images into Base64 data URIs that you can paste directly into HTML or CSS to inline the image.