Base64 Encoder/Decoder
Encode text to Base64 or decode Base64 back to text. Useful for data URIs, API tokens, and more.
What is Base64 encoding?
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 directly in HTML or CSS via data URIs, transmit binary data through text-only channels like email or JSON APIs, and encode authentication credentials in HTTP Basic Auth headers.
Common use cases
Developers use Base64 encoding to inline small images and fonts in stylesheets to reduce HTTP requests, encode JWT token payloads for inspection, pass binary file content through REST APIs that only accept text, and store small assets in localStorage or configuration files. Decoding is equally useful when you need to inspect an encoded API token or extract embedded image data.
How it works
Base64 takes every 3 bytes of input and maps them to 4 printable characters from the set A-Z, a-z, 0-9, +, and /. If the input length is not a multiple of 3, padding characters (=) are appended. This means Base64-encoded output is roughly 33% larger than the original binary data, which is why it is best suited for small payloads rather than large files.
More Developer Tools
JSON Formatter
Format, validate, and minify JSON data. Paste your JSON and get clean, readable output.
CSSColor Converter
Convert colors between HEX, RGB, and HSL formats. Preview colors in real-time.
CSSCSS Unit Converter
Convert between px, rem, em, %, pt, vw, and vh. Change one value and all others update instantly.