What is Base64 and when should you use it?
Base64 is a standard encoding that converts binary data into a safe ASCII string format. Developers use it daily to embed images in HTML and CSS via data URIs, transmit binary payloads in JSON APIs, encode authentication credentials in HTTP headers, and store binary blobs in text-only databases or configuration files. This tool lets you encode plain text or files to Base64 and decode Base64 strings back to readable text — all instantly in your browser with zero uploads.
How to use this tool
Select Encode mode to convert text or a file into Base64. Paste your text and click Encode, or use the file picker to encode any file. Switch to Decode mode to paste a Base64 string and convert it back to readable text. The Swap button moves the output into the input field and flips the mode, making round-trip testing effortless. Copy the result with one click.
UTF-8 and special characters
Unlike a naive btoa call that fails on non-ASCII characters, this tool uses TextEncoder and TextDecoder under the hood so you can safely encode emoji, accented characters, CJK text, and any valid UTF-8 string without errors.