Standard Base64 or Base64URL?
Standard Base64 uses + and /. Base64URL uses the ASCII hyphen (-) and underscore (_). Select the matching alphabet before decoding. Whitespace is ignored; a data URI prefix is not plain Base64 text.
Make text travel well. Encode UTF-8 text or inspect a Base64 string, without sending it anywhere.
Whitespace is ignored. Unpadded input is accepted when valid. Binary data is not treated as text.
Base64 represents bytes using printable characters. It is useful when binary data must travel through a text-only format. Anyone can decode it: Base64 does not keep secrets or replace encryption.
References: RFC 4648: Base encodings
Yes. Encoding converts text to UTF-8 bytes before Base64. Decoding rejects bytes that are not valid UTF-8 instead of silently replacing them.
Base64URL replaces + with − (the ASCII hyphen) and / with _. It often omits trailing = padding. Choose the URL-safe alphabet when processing Base64URL strings.
Invalid characters, misplaced padding, impossible lengths or invalid trailing bits are rejected. A syntactically valid Base64 value can still contain binary data rather than UTF-8 text.
A whole JWT is not one Base64 value. Its segments use Base64URL. You can decode a segment here, but decoding does not verify its signature or authenticity.
Validate the alphabet and the output type before using decoded data. A successful decode does not establish that the content is safe or trustworthy.
| Input or condition | What to expect |
|---|---|
| SGVsbG8= | Decodes to Hello in UTF-8. |
| Zg (no padding) | Decodes to f. Valid unpadded input is accepted. |
| _w== with URL-safe selected | Valid Base64URL bytes, but not valid UTF-8 text. Text decoding is rejected. |
| Zh== | Rejected: non-zero trailing bits are not canonical Base64. |
Standard Base64 uses + and /. Base64URL uses the ASCII hyphen (-) and underscore (_). Select the matching alphabet before decoding. Whitespace is ignored; a data URI prefix is not plain Base64 text.
Decoding reverses an encoding, not encryption. There is no secret key. Do not use Base64 to protect passwords, tokens or confidential information.
Text is encoded as UTF-8 before Base64. If decoded bytes are not valid UTF-8, this text tool reports an error. For image bytes or a data:image URI, use the dedicated image viewer.
This tool accepts valid missing padding, but does not guess damaged or truncated data. Check the original source rather than deleting arbitrary characters until a value decodes.