Base64 Encoder / Decoder
Base64 encode/decode + URL encode/decode. Browser-only, nothing sent anywhere.
Output will appear here…
Base64 encode/decode + URL encode/decode. Browser-only, nothing sent anywhere.
Output will appear here…
API Authentication
Basic auth headers use Base64-encoded "username:password" in the Authorization header.
Data URIs
Embed images directly in HTML/CSS as Base64-encoded data:image/png;base64,... strings.
Email Attachments
MIME email attachments are Base64-encoded so binary files can travel through text protocols.
JWT Tokens
JSON Web Tokens encode the header and payload as Base64URL (a URL-safe variant of Base64).
URL Parameters
URL-encode strings to safely pass them as query parameters without breaking URL structure.
Config Files
Kubernetes secrets and environment variables often store sensitive values as Base64-encoded strings.
What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that converts binary data into a string of 64 ASCII characters (A–Z, a–z, 0–9, +, /). It's used to safely transmit binary data over systems designed to handle text — like email, HTML attributes, or HTTP headers. The encoded output is about 33% larger than the original.
Is Base64 a form of encryption?
No. Base64 is encoding, not encryption. Anyone can decode a Base64 string without a key. It's used for data representation, not security. If you need to protect data, use proper encryption (AES, RSA) rather than Base64.
What is the difference between Base64 and Base64URL?
Base64URL replaces + with - and / with _ and removes padding = characters. This makes the output safe for use in URLs and file names without percent-encoding. JWT tokens use Base64URL encoding.
What is URL encoding?
URL encoding (percent-encoding) converts characters that aren't safe in URLs into a % followed by two hex digits. For example, space becomes %20 and & becomes %26. It's required when passing special characters as URL query parameters.
Why does Base64-encoded output have = at the end?
Base64 encodes data in 3-byte groups. If the input length isn't divisible by 3, padding characters (=) are added to make the output length a multiple of 4. One or two = characters at the end is normal and expected.
Does this tool handle Unicode and emoji?
Yes. The encoder uses encodeURIComponent before calling btoa(), which handles multi-byte characters including accented letters, CJK characters, and emoji that would otherwise cause errors with the native btoa() function.
More developer tools
JWT decoder, regex tester, JSON formatter, password generator and more.
Browse all toolsFeatured
Word Counter
Live word count, character count, sentence count, paragraph count, and reading time estimate as you type. Useful for blog posts, tweets, essays, and any platform with a character limit.
QR Code GeneratorPassword GeneratorJSON Formatter & DiffImage CompressorColor Picker & PalettePomodoro TimerLorem Ipsum GeneratorPercentage CalculatorBase64 Encoder / DecoderSee AllWord Counter
Live word count, character count, sentence count, paragraph count, and reading time estimate as you type. Useful for blog posts, tweets, essays, and any platform with a character limit.
QR Code Generator
Generate QR codes for URLs, plain text, WiFi credentials, or vCard contact info. Set size, foreground/background color, and error correction level. Download as PNG or SVG.
Password Generator
Generate strong passwords with configurable length (8–128), and toggles for uppercase, lowercase, numbers, and symbols. Strength meter, one-click copy. Runs entirely in the browser.
JSON Formatter & Diff
Paste raw or minified JSON to format, validate, and syntax-highlight it. Switch to diff mode to compare two JSON blobs side by side and see exactly what changed.
Image Compressor
Drag and drop JPG, PNG, or WebP images and compress them entirely in-browser using the Canvas API. Shows original vs compressed size and savings percentage. Nothing uploaded anywhere.
Color Picker & Palette
Full-featured color picker with HEX, RGB, HSL, and CMYK output. Upload an image to extract the 5 dominant colors as a palette. Copy any value with one click.