Base64 Encoder / Decoder
Developer Tools ยท Added 13 July 2026
Convert text to Base64 and back. Unlike the browser's built-in btoa, this handles the full Unicode range correctly, so emoji and non-Latin scripts survive the round trip. A URL-safe mode swaps the problematic characters for use in query strings and JWTs.
How to use the base64 encoder / decoder
- 1Choose Encode or Decode.
- 2Paste your text or your Base64 string.
- 3Switch on URL-safe mode if the output will go into a URL or a JWT.
- 4Copy the result โ the conversion happens as you type.
Examples
Encoding
- Input
- Hello, world!
- Result
- SGVsbG8sIHdvcmxkIQ==
Unicode round trip
- Input
- ใใใซใกใฏ ๐
- Result
- 44GT44KT44Gr44Gh44GvIPCfkYs= โ decodes back to the original exactly
About the base64 encoder / decoder
Where Base64 legitimately belongs
Email attachments, HTTP Basic authentication headers, data URIs for tiny inline assets, binary fields inside JSON, and the payload sections of JSON Web Tokens. The common thread is a channel that only reliably carries text.
It does not belong in a database column that could hold bytes, in a password field, or anywhere the 33 percent size penalty is paid for no reason.
Decoding safely
A Base64 string from an untrusted source is untrusted data after decoding too. Decoding a JWT payload here is a perfectly good way to see what a token claims โ but seeing the claims is not the same as verifying the signature, and an unverified token proves nothing.
As a general rule, use this tool to inspect and debug. Never use a decoded value in a security decision without validating it through the proper channel.
Frequently asked questions
Is Base64 encryption?
Why does btoa fail on non-ASCII text?
What is URL-safe Base64?
How much larger does Base64 make data?
Related tools
URL Encoder / Decoder
Developer Tools
Percent-encode and decode URLs and query parameters, with a query string breakdown.
JSON Formatter
Developer Tools
Pretty-print, minify and inspect JSON with precise error positions.
API Tester
Developer Tools
Send HTTP requests with headers, auth and a JSON body, and inspect the full response.