Base64 decode
Decode standard or URL-safe Base64 to UTF-8 text, or download the bytes if it is binary.
Loading the tool…
What it does, how to use it, and questions
What it does
Decoding turns Base64 back into the original bytes. If those bytes are valid UTF-8 they are shown as text; otherwise the tool says the result is binary and offers it as a download instead of showing garbage.
Both standard and URL-safe alphabets are accepted, with or without padding. Spaces and line breaks are ignored.
How to use it
- Paste the Base64 string.
- Read the text, or download the bytes if the result is binary.
Example
Input
aMOpbGxvIOKckw==
Output
héllo ✓
Things to watch for
- A
data:image/png;base64,prefix is not part of the Base64. Use the image tool, or remove the prefix. - A JWT has three Base64URL parts separated by dots. Use the JWT decoder to read them.
Questions
- Why does it say the output is binary?
- The decoded bytes are not valid UTF-8, so they are probably an image, a compressed file or an encrypted blob. Download them to inspect.
- What does “invalid character at position N” mean?
- Base64 only contains A–Z, a–z, 0–9,
+,/(or-,_) and=. The character at that position is something else. - Does it accept Base64 without padding?
- Yes. Missing
=is added back before decoding. - How do I decode on the command line?
echo "aMOpbGxvIOKckw==" | base64 --decode(or-Don older macOS).