Base64 encode and decode: text, images, files
Turn text or any file into Base64 — or paste Base64 and get the text, image or file back. In your browser.
This is not valid Base64 (or it does not decode to UTF-8 text). Check for stray characters.
Runs in your browser. Nothing leaves your device.
What is Base64 for?
Base64 writes binary data using only 64 safe characters — letters, digits, + and /. That lets images, files and arbitrary text travel through places that only accept plain text: JSON, XML, e-mail, URLs and HTML.
The most common use on the web is the data URL: an image written as data:image/png;base64,… and placed straight into an <img> tag or a CSS background, which saves one request for small icons. Pick "File → Base64" and keep the prefix ticked to get exactly that.
Base64 is an encoding, not encryption. Anyone can decode it, and it makes data about a third bigger, so it suits small files and is a poor choice for large images.
To restore a file, paste the Base64 under "Base64 → file". The type is read from the data URL or detected from the first bytes, so PNG, JPEG, GIF, WebP, SVG and PDF come back with the right extension.