Encode text to base64, decode base64 to text, or upload a file to get its base64 representation. This free base64 encoder decoder runs entirely in your browser with no server uploads. It auto-detects whether your input is base64 and offers one-click conversion.
Base64 encoding converts binary data into a text representation using 64 printable ASCII characters: A-Z, a-z, 0-9, +, and /, with = used for padding. Every three bytes of input become four base64 characters, making the output roughly 33% larger than the original data.
Unlike many online base64 tools that upload your data to a server, this encoder and decoder runs entirely in your browser using the built-in btoa() and atob() functions combined with proper UTF-8 handling. Your data never leaves your device, making it safe for encoding API keys, tokens, passwords, and other sensitive content. The file upload feature reads files locally using the FileReader API and produces a base64 string you can copy directly into your code.
Base64 encoding converts binary data into plain ASCII text so it can be safely transmitted through text-based systems. Common use cases include embedding images directly in HTML or CSS as data URIs, encoding email attachments in MIME format, passing binary data in JSON or XML payloads, and encoding credentials for HTTP Basic Authentication. Any time you need to represent binary data as a string that survives copy-paste, email transport, or URL parameters, base64 is the standard solution.
No. Base64 is an encoding scheme, not encryption. It transforms data into a different representation but does not protect it. Anyone with a base64 decoder can reverse the encoding and read the original content. If you need to protect sensitive data, use proper encryption algorithms like AES-256 or RSA before optionally base64-encoding the encrypted output for transport. Base64 is about format compatibility, not security.
Base64 encoding increases data size by approximately 33%. This happens because every three bytes of input are represented as four base64 characters. Three bytes contain 24 bits, which are split into four groups of 6 bits, and each 6-bit group maps to one of 64 characters. If the input length is not a multiple of three, padding characters (=) are added. For a 1 MB file, the base64 output will be roughly 1.33 MB.
Yes. Click the File Upload tab and drag-and-drop a file or click to browse. The tool reads the file locally using the browser's FileReader API and converts it to a base64 string. This works with any file type, including images, PDFs, fonts, and binary executables. The entire process happens in your browser; no data is uploaded to any server. For images, you can use the output directly as a data URI in your HTML or CSS.
Yes. This base64 encoder and decoder runs entirely inside your browser using JavaScript. Your data never leaves your device. There are no network requests, no server-side processing, and nothing is logged or stored. You can verify this by opening your browser's developer tools and monitoring the Network tab while encoding or decoding data. This makes it safe for working with API keys, authentication tokens, and other sensitive content.