Base64 Encode/Decode
Open toolEncode text to Base64 or decode Base64 back to text.
Turn text into Base64, or turn Base64 back into text. Base64 is a way of writing arbitrary data using only letters, digits, +, / and =, which makes it safe to embed in JSON, HTML, emails, and URLs-in-disguise such as data URIs.
How it works
Encoding first converts your text to UTF-8 bytes, then writes those bytes in Base64. This means accented letters, emoji, and non-Latin scripts encode correctly and round-trip back to exactly what you typed.
Decoding does the reverse: it reads the Base64, turns it into bytes, and interprets those bytes as UTF-8 text.
How to use it
- Choose Encode or Decode with the toggle at the top.
- Paste or type into the box below it — it is labelled Text when encoding and Base64 when decoding.
- Click the Encode or Decode button (its name follows the mode).
- Copy or download the result, or read the red message if the input was not valid.
Options & controls
Mode
- Encode / Decode
- Switches the direction. Changing mode clears the current result and any error but keeps what you typed in the input, so you can flip a result straight back by pasting it in.
Input and actions
- Text / Base64 box
- The input. Its label changes with the mode. The tool only runs when you click the action button; it does not update as you type.
- Encode / Decode button
- Runs the conversion. With an empty input it simply clears the result.
- Reset
- In the title row. Returns to Encode mode and clears the input, result, and any error.
Result
- Result box
- Read-only output, shown once a conversion succeeds.
- Copy
- Copies the full result to the clipboard.
- Download
- Saves the result as
base64-result.txt. - Error message
- Shown when decoding text that is not valid Base64 ("That doesn't look like valid Base64."), or in the rare case that encoding fails.
Tips & guidelines
- Base64 is an encoding, not encryption. Anyone can decode it, so never use it to hide passwords or secrets.
- Encoded output is about a third longer than the original text.
- If a decode fails, check for characters that are not part of standard Base64, such as stray quotes or a
data:URI prefix — remove everything before the actual Base64 characters first. - Line breaks and spaces inside the Base64 you paste are ignored when decoding, so wrapped Base64 (for example from an email or PEM file body) works.
Limits
- Only the standard alphabet (
A–Z a–z 0–9 + /) is understood. URL-safe Base64, which uses-and_, will be reported as invalid — swap those characters for+and/first. - Decoded bytes are always read as UTF-8 text. If the Base64 actually holds a binary file such as an image or PDF, the output will be garbled characters; this tool is for text, not for files.
Saved in your browser
Nothing. Your input and results exist only on the page and disappear when you refresh or close it.