Base64 Encoder & Decoder
Encode plain text to Base64 or decode Base64 back to text, including URL-safe variants. Runs entirely in your browser.
What Base64 is, and what it is not
Base64 re-encodes arbitrary bytes using 64 printable characters so they survive transport through systems that only handle text: email (MIME), JSON payloads, data URIs, JWTs and many HTTP headers. It is a encoding, not encryption. Anyone can reverse it with a single function call, so never treat Base64 as protection for a password, key or personal data.
Standard vs URL-safe
Standard Base64 uses + and / and pads the end with =. In a URL or a cookie those three characters are awkward, so a URL-safe variant replaces + with -, / with _ and drops the padding. JWTs are URL-safe Base64 of a JSON header and payload - paste the middle segment into the decoder above and you get the claims back, which is a quick way to check an expiry or a role claim.
Handling non-ASCII text
Older implementations encode UTF-16 and mangle accented characters and emoji. The decoder here converts to UTF-8 bytes first, so Chinese, Japanese, Arabic and emoji round-trip correctly.
Frequently asked questions
Is Base64 secure?
No. It is trivially reversible and provides no confidentiality. Use it for transport compatibility only.
Why does my decoded text look garbled?
The input was probably produced by a UTF-16 encoder. The output shows raw bytes as text, so characters outside the original encoding cannot be recovered.
Where is padding required?
Standard Base64 pads to a multiple of four with '='. Most decoders accept missing padding; the URL-safe variant usually omits it deliberately.
Can I decode a JWT payload with this?
Yes. Copy the middle segment of the token and decode it after converting from URL-safe.
Related tools
Word Counter
Count words, characters, sentences and paragraphs as you type, with an estimated reading time. Runs entirely in your browser.
Character Counter
Count characters with and without spaces, letters, digits and punctuation, plus a letter frequency table for any text.
Case Converter
Convert text between eight letter cases instantly: uppercase, lowercase, title case, sentence case, camelCase, PascalCase, snake_case and kebab-case.
JSON Formatter & Validator
Format messy JSON with clean indentation, minify it back, or find the exact position of a syntax error. Runs locally in your browser.