Base64 Decoder
Decode Base64-encoded strings back to readable text. Paste any Base64 string to see what it decodes to.
Common Values
| Input | Text |
|---|---|
| SGVsbG8= | Hello |
| V29ybGQ= | World |
| aGVsbG8gd29ybGQ= | hello world |
| dGVzdA== | test |
| YWRtaW4= | admin |
| cGFzc3dvcmQ= | password |
How It Works
Base64 decoding is the reverse of encoding. Each group of 4 Base64 characters decodes back to 3 bytes. The "=" padding characters indicate that the original data was not a multiple of 3 bytes. For example, "SGVsbG8=" decodes to "Hello".
Worked Examples
| Base64 | Text |
|---|---|
| SGVsbG8= | Hello |
| V29ybGQ= | World |
| Zm9v | foo |
| YmFy | bar |
| dGVzdA== | test |
| YWJj | abc |
Related Conversions
Frequently Asked Questions
- How do I decode a Base64 string?
Paste the Base64 string into this converter and click Convert. In code, use atob() in JavaScript, base64.b64decode() in Python, or Buffer.from(str,"base64").toString() in Node.js.
- What does "SGVsbG8=" decode to?
"SGVsbG8=" is "Hello" encoded in Base64.
- Why does Base64 end with == sometimes?
The == padding means the original data length was 1 mod 3 (not divisible by 3 with zero remainder). One = means the length was 2 mod 3.
- Can Base64 decode any binary data?
Base64 can encode and decode any binary data. When the original data is not valid UTF-8 text, the decoded output may contain garbled characters.