Free Base64 Encoder & Decoder Online
Encode text to Base64 or decode Base64 strings. File to Base64 conversion. Free developer tool.
What is Base64?
The Pix2Doc Base64 Encoder/Decoder converts text and files to and from Base64 encoding — entirely in your browser. Base64 is a binary-to-text encoding scheme used across software development: embedding images in HTML or CSS, transmitting binary data in JSON APIs, decoding email attachments, or storing binary data in text-only systems. Pix2Doc's Base64 tool handles both text strings and binary files (images, PDFs, any file type). The encoding and decoding is instantaneous and happens locally — no login required. This makes it safe for sensitive API keys, credentials, or private files.
Common Use Cases
- Encoding an image to Base64 to embed it directly in an HTML <img> src attribute
- Decoding a Base64 email attachment string to recover the original file
- Encoding API credentials (client ID + secret) for HTTP Basic Auth headers
- Testing REST APIs that require Base64-encoded payloads
How to Use Base64
Choose encode or decode mode
Toggle between 'Encode' and 'Decode'. Encoding converts text/files to Base64. Decoding converts a Base64 string back to its original form.
Input your data
For text: type or paste directly. For files: drop any file and it will be Base64-encoded instantly.
Copy or download the result
Copy the Base64 string to clipboard, or if decoding a file, download the reconstructed original file.
Supported Formats
| Input | Output |
|---|---|
| Text (UTF-8) | Base64 string |
| Base64 string | Decoded text / file |
| Any file (JPG, PDF, etc.) | Base64 data URI |