Base64 File Encoder/Decoder — Free Online File to Base64
Encode any file (PDF, image, binary) to Base64 and decode Base64 strings back to downloadable files — 100% client-side.
Frequently Asked Questions
Base64 File Encoding for APIs and Data Transmission
Base64 file encoding allows binary files to be transmitted or stored in text-based systems. When an API requires a file in a JSON payload, when you need to embed a PDF in XML, or when a database stores binary blobs as text — Base64 is the standard solution.
This tool reads files entirely in your browser using the FileReader API. No data is sent to any server. Files are converted to Base64 by reading their raw bytes and encoding every 3 bytes as 4 Base64 characters. The resulting string can be copied, pasted into API requests, or downloaded as a text file.
Decoding works by reversing the process: each 4 Base64 characters become 3 bytes, and the binary is reconstructed and offered as a download. You must provide the correct file extension so your OS can open the file with the right application.