Base64 Decoder
Decode Base64 or base64url to readable UTF-8 text, or view the raw bytes as hex. Handles missing padding, whitespace and data: URI prefixes.
40 characters · 40 bytes (UTF-8)
0 characters · 0 bytes (UTF-8)
Runs entirely in your browser. Your data is never uploaded.
What is Base64 Decode?
Turns a Base64 string back into the original data. It accepts both the standard and the URL-safe alphabet, with or without = padding, ignores spaces and line breaks, and strips a data:...;base64, prefix automatically. The bytes are shown as UTF-8 text, or as hex if they are binary.
How to use Base64 Decode
- Paste the Base64 string into Input.
- Read the decoded text in Output – it updates as you type.
- If you get a "not valid UTF-8" message, set Output format to Hex bytes to see the raw bytes.
- Use Copy or Use as input (to re-encode).
Example
WGluIGNow6BvIPCfkYs
Xin chào 👋
URL-safe/unpadded input is accepted as-is.
When to use Base64 Decode
Use it to read Base64 found in API responses, JWT parts, email sources, Kubernetes secrets or config files. If the Base64 represents a file (image, PDF, ZIP), use the Base64 File Decode tool instead, which detects the file type and lets you download it.
How Base64 Decode works
Whitespace and any data-URI prefix are removed, then each character is mapped back to its 6-bit value (+/- = 62, //_ = 63). The bits are regrouped into 8-bit bytes; trailing = signs only mark how many bytes the last group holds. Invalid characters, an impossible length (remainder of 1 character) or misplaced padding produce an error instead of silently wrong output. The bytes are decoded as strict UTF-8 (TextDecoder with fatal: true).
Common Use Cases
- Reading the JSON inside a JWT header or payload
- Inspecting a Kubernetes Secret value
- Decoding an HTTP Basic auth header
- Checking what a base64url token contains
- Viewing binary data as hex bytes for debugging
Security Note
Decoding runs locally. Be careful with secrets: anything Base64-encoded is readable by whoever has it.
FAQs
Do I need to add the missing = padding?
No. Padding is optional on input; the decoder works out the length itself.
Why do I get "not valid UTF-8 text"?
The decoded bytes are not text (for example an image or compressed data), or the text was encoded with another character set. Switch Output format to Hex bytes, or use the Base64 File Decode tool.
Can it decode base64url from JWTs?
Yes. - and _ are accepted in addition to + and /.