Base64 Encoder and Decoder
Encode and decode UTF-8 text with Base64 or Base64URL.
What it does
Base64 represents bytes using a compact alphabet of letters, numbers, plus, slash, and optional padding. It is not encryption. It is a transport encoding that keeps binary or Unicode text safe inside systems that expect plain text.
Software developers most often see Base64 in HTTP Basic auth, data URLs, cryptographic keys, signed payloads, and JSON tokens. Base64URL swaps plus and slash for hyphen and underscore, then often removes padding, which makes it friendlier for URLs and JWT segments.
Common uses
- Encode UTF-8 strings before putting opaque bytes into JSON, URLs, logs, or config files.
- Decode values from API payloads, JWT sections, authorization headers, and data URLs when you need to inspect the original text.
- Use Base64URL when the encoded value will live in a path, query string, cookie, or token segment.
Watch outs
- Base64 does not hide secrets. Anyone can decode it without a key.
- Padding with equals signs is normal in standard Base64, but often omitted in Base64URL.
- This tool decodes to UTF-8 text. Random binary bytes may not be displayable as text.
Privacy
Input stays in your browser. The Worker only serves the static page and never receives text you encode or decode.
FAQ
Is Base64 encryption?
No. Base64 is reversible encoding, not encryption. It does not use a key and should never be treated as secret protection.
When should I use Base64URL?
Use Base64URL for URL paths, query strings, cookies, and token segments where plus, slash, or equals padding can be awkward.
Why can a Base64 decode fail?
The value may contain characters outside the Base64 alphabet, have impossible padding, or decode to bytes that are not valid UTF-8 text.
Related tools
Encryption
Browser-side encryption and decryption with AES, TripleDES, Rabbit, and RC4 using an optional password, plus reproducible Node.js and OpenSSL CLI commands.
Basic Auth
Create Basic Auth header values, full Authorization headers, and curl snippets from username and password credentials in your browser.
URL Encoder
Encode and decode URL components or full URLs, with clear errors for malformed percent escapes.