Base64 Encoder / Decoder
A free Base64 encoder and decoder online — UTF-8 safe, with one-click swap between input and output.
What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that represents binary data using a 64-character alphabet of ASCII letters, digits, +, and /, with = for padding. Specified originally in RFC 1421 and now in RFC 4648, it lets you embed arbitrary bytes in protocols and formats that only transport text reliably. The trade-off is roughly 33% size inflation for the encoded output.
Base64 decode with UTF-8 support
This Base64 encoder/decoder runs entirely in your browser and treats input as UTF-8 by default, so emoji, accented characters, and non-Latin scripts round-trip cleanly — something the barebtoa/atob functions do not handle on their own. Encoding goes through TextEncoder; decoding goes back through TextDecoder. You can also click Swap output → input to flip between encode and decode modes in one step.
Base64 in JWTs — a concrete example
JSON Web Tokens use Base64 (the URL-safe variant) to encode each segment. A typical JWT header looks like eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9. Decoding that with this tool yields:
{"alg":"HS256","typ":"JWT"}Base64 is everywhere — data URLs, MIME email attachments, PEM certificates, HTTP Basic auth, and most API payloads that carry binary blobs. Remember: Base64 is encoding, not encryption. Anyone can decode it.