Base64 Encoder & Decoder
Encode strings to Base64 or decode Base64 back to text. Privacy-friendly — runs in your browser.
What is Base64 and why is it everywhere?
Base64 is an encoding scheme — not encryption — that represents arbitrary binary data using only 64 printable ASCII characters (A-Z, a-z, 0-9, plus +, /, and = as padding). It exists because many transport protocols, file formats, and APIs are text-only or treat certain bytes specially: email (SMTP was designed for 7-bit ASCII), JSON (cannot contain raw bytes), URLs (have reserved characters), HTTP headers (line-oriented text), and HTML attributes all need a way to carry binary data through text channels. Base64 solves this by grouping the input bytes in sets of 3 (24 bits) and re-encoding each set as 4 Base64 characters (6 bits each). The size penalty is exactly 33% — every 3 bytes becomes 4 characters. This tool encodes UTF-8 text or Base64 strings in either direction, entirely in your browser. It correctly handles multi-byte UTF-8 characters (emoji, non-Latin scripts), which naive Base64 implementations using atob/btoa directly will mangle.
Common use cases
Embed small images directly in CSS as data: URLs (eliminates one HTTP request for tiny icons).
Decode the payload of a JWT or Basic Auth header to inspect what's inside.
Encode binary file contents to put in a JSON field or environment variable.
Move binary data through systems that don't preserve arbitrary bytes (email, copy/paste).
Decode base64-encoded API responses or webhook payloads during debugging.
Convert binary credentials to a copy-paste-friendly format for ops handoff.
Frequently asked questions
Is Base64 encryption?▼
Why does Base64 add ~33% size?▼
What is URL-safe Base64?▼
Why do I see '=' at the end?▼
Does this handle emoji and non-Latin text?▼
Where do I see Base64 in real apps?▼
Related tools
JWT Decoder
Decode JSON Web Tokens (JWT) instantly — inspect the header, payload, and signature claims. Runs entirely in your browser; tokens never leave your device. Safe for production secrets.
JSON Formatter & Validator
Format, validate, and minify JSON instantly. Catches syntax errors with line numbers, pretty-prints with adjustable indent, supports large payloads. Runs in your browser — no upload.
XML Formatter & Beautifier
Format and beautify XML documents — proper indentation, line breaks, namespace handling. Useful for SOAP responses, sitemaps, RSS feeds, and Android resource files.
URL Encoder & Decoder
Encode/decode URL-safe strings.
HTML Entity Encoder & Decoder
Convert special characters to/from HTML entities.
CSS Minifier
Minify CSS to reduce file size.