Base64 Encoder and Decoder
Encode text to base64 or decode it back, with full UTF-8 support and automatic handling of base64url input. Runs entirely in your browser.

Base64 encodes arbitrary binary data as 64 safe ASCII characters so it survives systems that only handle text - email bodies, JSON payloads, data URIs and URLs. It is an encoding, fully reversible by anyone, and provides no security whatsoever.
Runs entirely in your browser · no signup · nothing is uploaded · updated 2026-08-29
UTF-8 safe in both directions, and base64url input (with - and _) decodes correctly.
How to use it
- 1.Choose encode or decode.
- 2.Paste your text or base64 string.
- 3.Copy the result - nothing is sent to a server.
Frequently asked questions
Is base64 encryption?
No. It is an encoding, fully reversible by anyone. It provides zero security. Never use it to hide a secret.
What is base64url?
A variant that replaces + with - and / with _ so the output is safe in URLs and filenames. JWTs use it. This tool accepts both on decode.
Why does my decoded text look wrong?
Almost always a UTF-8 problem - naive atob returns a binary string and mangles anything outside ASCII. This tool decodes through TextDecoder, so accented and non-Latin characters come back intact.
How much larger is base64?
About 33%. Three bytes become four characters, plus padding. That is why inlining large images as data URIs bloats a page.
Why does base64 end in equals signs?
Padding. The encoding works in three-byte groups; when the input does not divide evenly, one or two = characters pad the final group. base64url usually omits them.
When should I use a data URI instead of a file?
For images under about 2KB used above the fold, where the extra 33% is cheaper than a round trip. Anything larger is better as a real file the browser can cache.
How do I encode base64 in the terminal?
base64 < file on macOS and Linux, base64 -d to decode. Add -w 0 on GNU coreutils to stop it wrapping lines.
Is base64 the same as encryption or hashing?
No to both. Encryption needs a key and hashing is one-way. Base64 needs neither and reverses in a single step - it hides nothing from anyone.
The guide behind this tool
Base64 explained: what it is, and when to use it
How base64 encoding works, why it makes data 33% larger, the difference between base64 and base64url, and the one case where inlining is worth it.
How to decode a JWT (and what every claim actually means)
Decode a JSON Web Token by hand or in the browser, understand every registered claim, and know exactly why decoding is not the same as verifying.
Tools that pair with this one
CSV to JSON
Turn a CSV into an array of JSON objects in your browser, with proper handling of quoted fields, embedded commas and custom delimiters.
JSON to CSV
Convert a JSON array into a CSV you can open in Excel or Google Sheets, with headers taken from every key that appears.
Password Generator
Generate strong random passwords in your browser using the Web Crypto API, with an entropy figure so you can see how strong they actually are.
JWT Decoder
Paste a JSON Web Token to decode its header and payload and read every claim, including expiry. Runs entirely in your browser.
Built something?
RankCert is a weekly launch board where products rank on domain control we verify ourselves - not upvotes. Listing is free and the link is dofollow whether or not you display our badge.