Base64 Encoder / Decoder
Paste text to encode it as Base64, or paste a Base64 string to decode it. Handles Unicode characters correctly. Everything runs in your browser.
How it works
Base64 is a binary-to-text encoding scheme that represents binary data using a set of 64 printable ASCII characters. It is commonly used to embed images in HTML or CSS, transmit binary data over text-based protocols like email (MIME) or JSON APIs, and store credentials in configuration files. Each group of three bytes is converted into four Base64 characters, making the encoded output roughly 33% larger than the original.
This tool uses the browser's built-in btoa and atob functions combined with
TextEncoder and TextDecoder to handle the full range of Unicode characters,
including emoji and characters outside the Latin-1 range. No data is sent to any server — encoding and
decoding happen entirely in your browser's JavaScript engine.
Common use cases include encoding API keys for Basic Auth headers, debugging encoded payloads in URLs or JWTs, and converting small files to data URIs. If the input is not valid Base64 when decoding, the tool will display an error so you can correct the string.