🔐 Base64 Encoder & Decoder
Encode text and files to Base64, or decode Base64 to text. Runs in your browser.
Last updated: November 8, 2026 · By the BoltQuickTools team
Move bytes through a text-only channel
JSON fields, HTTP headers and data URIs can only carry text, so binary data and awkward characters get Base64-encoded on the way in. Developers reach for this page to produce such a string quickly, or to see what a string they found actually contains.
Three modes
- Pick Encode, Decode or File to Base64 at the top.
- For text, fill in Input and click Convert. Pasting converts on its own, but typing does not.
- Use Copy Output, or Clear to start again. The line under the output shows the time taken and the character counts.
- For a file, drop it on the box or click to browse. The result appears under Base64 Output, with Copy for the bare string and Copy as Data URI for a string starting
data:image/png;base64,or whatever type the browser reports.
Sample conversions in both directions
| Mode | Input | Output |
|---|---|---|
| Encode | Hello | SGVsbG8= |
| Encode | héllo ✓ | aMOpbGxvIOKckw== |
| Decode | aMOpbGxvIOKckw== | héllo ✓ |
| Decode (no padding) | SGVsbG8 | Hello |
Text is converted to UTF-8 bytes first, which is why the seven characters of héllo ✓ become sixteen of Base64. For a look at why those byte counts differ, see the character encoding article.
Input it will refuse or change
- Only the standard alphabet decodes. URL-safe Base64 uses
-and_, soaGk_stops with an error. Replace-with+and_with/first. The segments of a token are URL-safe, so the JWT decoder is the better tool for those. - Output is always standard Base64 with padding. There is no URL-safe option.
- Decoded bytes must be valid UTF-8. Binary data such as
/////w==gives an error rather than garbage. This page has no way to decode Base64 back into a file. For pictures, the image Base64 converter has a Base64 to Image mode. - Whitespace is handled leniently when decoding. Line-wrapped input and missing padding both work. In Encode mode nothing is trimmed, so a stray trailing newline becomes part of the result.
- Swap does not convert. It exchanges the two boxes and flips the Encode/Decode tab, and you still have to click Convert.
- There is no file size cap in the code, but the whole file is held in memory and shown in a text box, so very large files can make the tab sluggish.
- The Data URI type comes from the browser. If it cannot tell, the prefix is
application/octet-stream.
Is Base64 a way to hide something?
No. Anyone can reverse it with no key, as this page shows. Never treat a Base64 string as protected.
Why is the output longer than the input?
Every 3 bytes become 4 characters, so the result is about a third larger, plus up to two = signs of padding. Non-English text grows further because UTF-8 uses several bytes per character.
Does my text or file leave the browser?
The conversion uses the browser's built-in btoa, atob and FileReader, and the tool's code makes no network request with your input. The page separately loads Google web fonts, the site's analytics script, and ad scripts if you accept them, as every page here does.