What each conversion is for
| Conversion | Typical use | Example |
|---|---|---|
| Base64 | Binary data in JSON, email attachments, Basic auth headers | Hello → SGVsbG8= |
| Base64URL | JWTs and values that go into URLs | <<? → PDw_ |
| URL | Query string values and path segments | a b&c → a%20b%26c |
| HTML entities | Showing user text safely inside HTML | <b> → <b> |
| JSON string | Putting text inside a JSON value, or reading an escaped payload from a log | line "1" → "line \"1\"" |
| Hex | Looking at raw bytes, hashes and binary protocols | Hi → 4869 |
| Unix timestamp | Reading created_at values, JWT exp claims and log times | 1700000000 → 2023-11-14T22:13:20Z |
Unicode works properly
JavaScript's built-in btoa() fails on text like café or emoji. This tool converts text to UTF-8 bytes first, so every character round-trips correctly and the Base64 matches what Java, Python and most servers produce.
Unescaping JSON from logs
Logs and message queues often store a JSON payload as an escaped string, full of \" and \n. Choose JSON string and Decode to turn it back into readable JSON. If the result is JSON itself, it is formatted for you.
Decoding files
When Base64 or hex decodes to something that isn't text, such as an image or a zip archive, you'll see the bytes as hex, a hint about the file type, and a Download button. Going the other way, File to Base64 encodes any file up to 10 MB without uploading it.
Frequently asked questions
Is Base64 encryption?
No. Base64 only changes how bytes are written so they survive systems that expect text. Anyone can decode it, so it gives no protection to passwords or other secrets.
What's the difference between Base64 and Base64URL?
Base64URL uses - and _ instead of + and / and usually drops the = padding, so the result can go into URLs and file names without escaping. JWTs use Base64URL. The decoder here accepts both.
Why does decoding show hex instead of text?
The decoded bytes aren't readable UTF-8 text, for example an image or a zip file. The tool shows them as hex, tells you what kind of file they look like, and lets you download them.
Is the timestamp in seconds or milliseconds?
It's detected from the number of digits: up to 11 digits is read as seconds, 12 to 13 as milliseconds, and longer numbers as microseconds or nanoseconds. The result says which one was used.