Encode and decode Base64
Encode text or a file to Base64 and decode it back, with URL-safe output and data URIs. Runs in your browser — nothing is uploaded.
- Free, no account
- Nothing is uploaded
- Runs in your browser
How it works
- 1 What goes in Text or Base64
- 2 It runs in your browser On your own device. Nothing is uploaded, there is no queue and no account, and it keeps working with the network switched off.
- 3 What comes back The other one, Unicode intact
What it does
Encode text or a whole file, decode a string back, and get a data URI when you need one. URL-safe output is a checkbox away, which is what JWTs and query strings actually carry.
This page does the work itself. Your data is handled by the browser and never sent anywhere — there is no server here to send it to.
Questions
Why do other Base64 tools break on accents and emoji?
Because btoa() throws on any character above U+00FF. The usual workaround mangles the string instead of encoding it. Text here is converted to UTF-8 bytes first, so café and 🎉 encode and decode correctly.
What is URL-safe Base64?
The same encoding with - and _ in place of + and /, and the trailing = padding dropped. Standard Base64 breaks when it goes into a URL or a filename because those characters mean something there. JWTs use the URL-safe form, which is why pasting one into an ordinary decoder fails.
Is Base64 encryption?
No, and treating it as such is a real mistake. It is a way of writing bytes using 64 safe characters. Anyone can decode it instantly — this page does it with no key at all.
More developer tools
-
Developer
Text ⇄ binary
Translate text to binary, hex or octal and back again, in UTF-8.
-
Developer
SHA hashes
Compute SHA-1, SHA-256, SHA-384 and SHA-512 for text or a file, using your browser's own crypto engine.
-
Developer
Unix time
Convert Unix time to a date and back, in UTC and your own timezone at once, with seconds and milliseconds.
-
Developer
URL encode
Percent-encode a URL or a single value and decode it back, with the encodeURI and encodeURIComponent distinction made explicit.
-
Developer
UUID
Generate v4 random or v7 time-ordered UUIDs in bulk, from your browser's cryptographic random source.
-
Developer
JWT decoder
Read a JWT's header and payload, with expiry checked against the clock.
-
Developer
Regex tester
Test a JavaScript regular expression against your own text, see every match and capture group, and read the pattern back in plain English.
-
Developer
Cron expressions
Turn a cron expression into plain English and see its next five run times, in your own timezone and in UTC.
-
Developer
cURL converter
Paste a curl command and get it back as JavaScript fetch, Python requests and a raw HTTP request.