All Tools
Categories
XML Tools 64 Email Marketing Tools 55 Import-Export Tools 50 JSON Tools 36 Text Tools 12 Shipping Freight Tools 5 Calculator 4 Marketing Tools 3
About Contact Privacy

Base64 to JSON Converter

Decode base64 to JSON instantly. Tolerates whitespace, data: URL prefixes and URL-safe variants, then pretty-prints the result. No uploads, works offline.

Base64 Input
Waiting for input
JSON Output
JWT payloads use the URL-safe alphabet — switch that option on when decoding a token's middle segment. If the decoded text is not JSON, it is still shown so you can see what the payload actually contains.

About Base64 to JSON Converter

Somewhere in almost every developer’s inbox is a ticket that reads: “the system sent me this string, what is it?” followed by a wall of characters ending in equals signs. It is base64 — and what it holds, nine times out of ten, is JSON. The string could be a JWT payload segment, a data URI from a marketing email, a cookie value, or metadata a cloud provider attached to a resource. Decoding it by hand means pulling out an old script, dealing with whitespace that breaks the parse, remembering that + and / mean something different in URL-safe contexts, and then still ending up with a wall of unformatted JSON.

Base64 to JSON Converter removes every one of those friction points. Paste the raw string — with or without whitespace, with or without a data: URL prefix, standard or URL-safe alphabet — and get back clean, pretty-printed JSON with the correct UTF-8 handling for Unicode content. If the decoded text turns out not to be JSON, you still get the text with a clear warning instead of a dead end. Live conversion, byte-accurate decoding, copy and download, all in the browser.

Features

  • Whitespace-tolerant: Newlines, tabs and spaces inside the base64 are stripped automatically — paste values as they arrived in an email.
  • Data URI aware: data:application/json;base64, prefixes are detected and removed when the option is on.
  • URL-safe support: - and _ characters from base64url (JWT, query strings) are mapped back to + and / automatically.
  • Correct UTF-8 decode: Emoji and international characters return byte-for-byte identical to the original JSON.
  • Pretty-printed output: Indentation of 2 or 4 spaces, or compact single-line output, chosen before decoding.
  • Honest errors: Invalid base64 is flagged, and non-JSON decoded content is shown as text with a warning rather than hidden.
  • Copy and download: One-click clipboard copy or save the decoded JSON as a file.
  • Fully private: All decoding happens client-side — nothing is uploaded.

How to Use

  1. Paste the base64 string into the input pane. It may contain line breaks, spaces, a data: prefix, or even quotes copied from a log — those are handled.
  2. Check the two options. Data URI stripping is on by default; URL-safe mapping should be on for JWT tokens, off for standard base64. The live output will usually make it obvious which one is needed.
  3. Choose the output indentation — 2 spaces for readability, 4 for wide monitors, compact for round-tripping.
  4. Read the result. Valid JSON is pretty-printed with a confirmation. Non-JSON content is shown with a warning instead of an error.
  5. Copy or download the decoded JSON for use elsewhere.

Examples

Example 1 — Inspecting a JWT payload. A token arrives as eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjoiYWRtaW4iLCJyb2xlIjoib3duZXIiLCJleHAiOjE4MDAwMDAwMDB9.abc123. Paste the middle segment into this tool with URL-safe mode on: the claims come back as formatted JSON in seconds — no terminal one-liner required.

Example 2 — Email data URIs. A support email embeds a configuration as data:application/json;base64,ewogICJ0aGVtZSI6... Paste the entire value with the prefix included; the prefix is stripped and the config is decoded into readable JSON.

Example 3 — Cloud metadata. An EC2 instance user-data script stores application settings as a base64 blob. Decode it here to audit what the instance actually launched with, then edit and re-encode with the companion JSON to Base64 tool.

Example 4 — Debugging an API gateway. A gateway logs the request body as a single base64-encoded line, wrapped across several lines in the log file. Paste the wrapped value — whitespace is stripped, and the original payload is back in view.

Benefits

  • Decode without friction: No terminal, no scripts, no manual cleanup of whitespace or prefixes.
  • JWT and token debugging in seconds: URL-safe mode plus UTF-8 decoding reads modern token payloads exactly.
  • See the truth, not an error: Non-JSON content is still shown, so a confusing payload never becomes a dead end.
  • Byte-accurate Unicode: What was encoded comes back exactly — no mojibake from a naive Latin-1 decode.
  • Private by default: Payloads stay in your browser, which matters when the base64 contains real customer data.

Frequently Asked Questions

Where does base64-encoded JSON actually come from?
More places than you would think: JWT payload segments (the middle part between the dots), data URIs in emails and HTML, cloud provider metadata, API gateway headers, cookies, and support tickets where someone pasted an opaque string. They all look like gibberish until you decode them — which is exactly what this tool does.
What if my base64 contains spaces or line breaks?
No problem. Whitespace is stripped automatically before decoding, so you can paste a value wrapped across multiple lines in an email or a config file and it still decodes correctly. You do not need to clean it up by hand.
What about data:application/json;base64, prefixes?
When the option is enabled, the prefix is detected and removed automatically. Paste the whole data URI — including the data: part — and you get the JSON out the other side. The same applies to any leading or trailing quote characters you might have copied from a log file.
Will the JSON decode to the original bytes if it contained emoji?
Yes. The decoded bytes are run through a UTF-8 decoder rather than being treated as Latin-1, so emoji, CJK text and accents come back exactly as they were before encoding. This is the step most naive decoders get wrong.
What is base64url and why does my string use - and _?
URL-safe base64 swaps the + and / characters for - and _, which are safe inside URLs. JWT tokens and query strings use it. The URL-safe option maps those characters back before decoding, so you can paste a token and get JSON out without manual substitution.
What happens if the decoded text is not JSON?
Valid base64 always decodes to some text. If that text is not valid JSON, the tool shows the decoded text anyway with a clear warning that it is not JSON — so you still recover the content, and you know the encode side was not JSON.
Is the base64 sent to a server?
No. Decoding, UTF-8 conversion and pretty-printing all happen in your browser. Nothing is uploaded, stored or logged.