Skip to content
MewixMewix

Base64 encode and decode

Switch between encode and decode, paste text, and copy the result — handy for data URLs, basic auth strings, and debugging payloads.

Updated by the Mewix team

UTF-8 text, not arbitrary binary files

Encode mode uses the UTF-8 path implemented in the client: encodeURIComponent then btoa so emoji and accented characters survive round-trip decoding. Decode reverses with atob and a TextDecoder. Large binary blobs are better handled with dedicated file tools.

Encoding is not secrecy

Anyone can decode Base64 without a key. Do not treat encoded API keys or passwords as protected — they are only transformed for transport or storage formats that expect ASCII-safe strings.

Questions

Why does my decode fail?

Invalid padding, stray whitespace, or non-Base64 characters break atob. Trim the input and confirm the source used standard Base64, not a URL-safe variant with - and _ unless you convert first.

Where do JWT segments get decoded?

JSON Web Tokens use Base64url. Try the JWT decoder for header and payload JSON instead of raw Base64 here.