JSON Formatter
Beautify, minify and validate JSON with precise error locations.
Encode text to Base64 or decode it back, switch to URL-safe Base64, and handle percent-encoding for query strings and URL components. Small files can be converted to data URIs too. Nothing is sent anywhere, so secrets stay on your machine.
Four steps, no account, nothing uploaded.
Pick Base64, Base64URL or URL percent-encoding depending on where the output will be used.
Type or paste text into the input panel. To encode a file instead, use the file picker to generate a data URI.
Press Encode or Decode. Results appear immediately, and invalid input is flagged with a clear explanation.
Use Copy to place the result on your clipboard, or Swap to move it into the input for chained conversions.
Built so your files never have to trust a server.
Base64 is encoding, not encryption — anything you paste is trivially readable. That is exactly why decoding tokens should never happen on someone else's server. Here it does not.
Text is converted through UTF-8 before encoding, so emoji, accents and non-Latin scripts survive the round trip intact.
Switch to Base64URL for JWTs and query parameters, or use percent-encoding for encodeURIComponent-compatible output.
Convert a small image or font into a ready-to-paste data URI for inlining directly in CSS or HTML.
Everything people ask about the Base64 Encoder.
No. Base64 is a reversible encoding that represents binary data using 64 printable ASCII characters. Anyone can decode it instantly with no key. Never use it to protect passwords or secrets — use real encryption for that.
Standard Base64 uses "+" and "/", which have special meaning inside URLs, and pads with "=". Base64URL substitutes "-" and "_" and usually omits the padding, making the output safe to drop into a URL path or query string. JSON Web Tokens use the URL-safe variant.
Percent-encoding is for making text safe inside a URL, converting characters such as a space into %20. Use it for query-string values and path segments. Base64 is for representing arbitrary binary data as text, which is a different problem.
The classic btoa function fails on characters above U+00FF. This tool encodes text as UTF-8 first, so emoji and non-Latin scripts round-trip correctly. If another tool mangled your text, it most likely skipped that UTF-8 step.
You can decode the header and payload segments, which are Base64URL-encoded JSON — paste a segment (the part between dots) and decode in Base64URL mode. The signature is binary and will not render as readable text. Doing this locally is far safer than pasting a live token into an online decoder.
About 33% larger, since every three bytes become four characters, plus padding. That overhead is why inlining large images as data URIs usually hurts page performance rather than helping it.
Files up to a few megabytes work fine. Larger ones produce enormous strings that will make the browser sluggish. As a practical rule, only inline assets under roughly 10 KB — beyond that a normal file request is faster.
More free utilities that run entirely in your browser.
Beautify, minify and validate JSON with precise error locations.
Count words and characters live, with readability scoring and keyword density.
Convert PNG, JPEG and WebP images and compress them with a quality slider.