Base64 is a way to represent binary data using 64 printable characters. Decoding reverses that: it turns a Base64 string back into the original text or bytes. Base64 is an encoding, not encryption — anyone can decode it, so never use it to hide secrets.
The quickest way is the free Base64 decoder — paste, get the result, everything runs in your browser. Below are code methods too.
Decode Base64 online (no install)
- Open the Base64 tool and select Decode.
- Paste your Base64 string into the input box.
- The decoded text appears instantly on the right — click Copy.
Decode Base64 in JavaScript
// Browser (ASCII)
const text = atob("SGVsbG8h"); // "Hello!"
// Browser, UTF-8 safe (emoji, accents)
const bytes = Uint8Array.from(atob(b64), c => c.charCodeAt(0));
const text2 = new TextDecoder().decode(bytes);
// Node.js
const text3 = Buffer.from(b64, "base64").toString("utf8");Decode Base64 in Python
import base64
text = base64.b64decode("SGVsbG8h").decode("utf-8") # "Hello!"Decode Base64 on the command line
echo "SGVsbG8h" | base64 --decode # Linux
echo "SGVsbG8h" | base64 -D # macOSCommon Base64 decoding errors
- Invalid character: strip stray spaces and line breaks before decoding.
- Wrong padding: valid Base64 length is a multiple of 4, padded with
=. - It is URL-safe Base64: if the string contains
-or_, it uses the URL-safe alphabet — see URL-safe Base64 explained. - It is not actually Base64: double-check the source really produced Base64.
Is Base64 encryption?
No. Base64 provides no security — it is trivially reversible. Use it to move data safely through text-only channels (URLs, JSON, email), and use real encryption when you need confidentiality.
Ready to decode? Open the Base64 decoder →
