Not valid base64
not valid!!- Why:
- Characters outside the alphabet. Base64 uses A–Z, a–z, 0–9, + and /, with = for padding.
- Fix:
- Check for stray punctuation or a copied line break in the middle of the string.
Encoding & Conversion
Convert text to and from Base64. Unicode is handled correctly via UTF-8, and the URL-safe variant (RFC 4648 §5) is supported for tokens and query strings.
Base64 is an encoding, not encryption. Anyone can decode it. Never use it to protect secrets.
This tool runs entirely in your browser. Your input is never uploaded, stored or logged.
Base64 maps every three bytes of input onto four characters drawn from a 64-character alphabet, which is why encoded output is always about a third larger than its input. The "=" characters at the end are padding that indicates the original length was not a multiple of three.
Text has to become bytes before any of that can happen, and the encoding used matters. This tool converts to UTF-8 first, which is what makes non-ASCII input work. The browser built-in btoa does not: it assumes every character fits in one byte and throws on anything above U+00FF, which is why encoding an accented word or an emoji fails in the console but works here.
Decoding reverses both steps, and the second can fail independently of the first. A string can be perfectly valid Base64 and still decode to bytes that are not valid UTF-8 text — that happens whenever the original input was an image, a key, or any other binary payload. This tool reports that rather than returning replacement characters, because silently mangled output is harder to notice than an error.
Every example below is run against this tool in our test suite, so what it says here is what the tool actually does.
not valid!!QQQQQ//8=Last updated