Base64 to JSON Converter
Decode Base64 strings back to formatted JSON.
Free online JSON to Base64 converter. Paste any JSON and get a Base64 encoded string instantly. JSON is validated and pretty-printed before encoding. All client-side.
JSON is already text, so encoding it to Base64 is never about making it transportable in the way that images or PDFs need. It is about escaping. JSON is full of characters that carry meaning somewhere else in the stack: quotes, braces, colons, commas, ampersands, and newlines. Base64 flattens all of that into a single opaque token made only of letters, digits, and two punctuation marks, which sails through layers that would otherwise mangle it.
Take a compact object with three fields. The encoder converts it to UTF-8 bytes and then applies the standard three bytes to four characters transformation.
Notice that every Base64 encoded JSON object begins with the characters eyJ. That is not a coincidence: the opening brace followed by a double quote always produces that prefix, which is a quick way to recognise an encoded JSON payload in a log file.
Base64 encodes bytes, and pretty printed JSON is full of bytes that carry no meaning. Every space of indentation and every newline is encoded faithfully and inflates the result. Minifying first, removing all whitespace between tokens, produces a shorter string that decodes to a semantically identical object.
Remember the underlying arithmetic: Base64 output is always about 33 percent larger than its input. Encoding JSON that is already safe to transmit costs you a third of the payload for no benefit, so reach for it only when the transport layer actually requires an opaque token. Key ordering also matters, because two objects that are logically equal but written with keys in a different order produce completely different Base64 strings.
Encoding also gives no integrity guarantee on its own. Anyone can edit a Base64 encoded object and re-encode it. Only a signature, as used in the JWT signature segment, tells you the content has not been tampered with.
Every 6 bit group produces a value between 0 and 63, and that value is looked up in the table below. RFC 4648 fixes this ordering: uppercase letters first, then lowercase, then digits, then the plus and slash characters. The padding character (=) is not part of the alphabet, it only marks the end of an incomplete group.
| Index | Char |
|---|---|
| 0 | A |
| 1 | B |
| 2 | C |
| 3 | D |
| 4 | E |
| 5 | F |
| 6 | G |
| 7 | H |
| 8 | I |
| 9 | J |
| 10 | K |
| 11 | L |
| 12 | M |
| 13 | N |
| 14 | O |
| 15 | P |
| Index | Char |
|---|---|
| 16 | Q |
| 17 | R |
| 18 | S |
| 19 | T |
| 20 | U |
| 21 | V |
| 22 | W |
| 23 | X |
| 24 | Y |
| 25 | Z |
| 26 | a |
| 27 | b |
| 28 | c |
| 29 | d |
| 30 | e |
| 31 | f |
| Index | Char |
|---|---|
| 32 | g |
| 33 | h |
| 34 | i |
| 35 | j |
| 36 | k |
| 37 | l |
| 38 | m |
| 39 | n |
| 40 | o |
| 41 | p |
| 42 | q |
| 43 | r |
| 44 | s |
| 45 | t |
| 46 | u |
| 47 | v |
| Index | Char |
|---|---|
| 48 | w |
| 49 | x |
| 50 | y |
| 51 | z |
| 52 | 0 |
| 53 | 1 |
| 54 | 2 |
| 55 | 3 |
| 56 | 4 |
| 57 | 5 |
| 58 | 6 |
| 59 | 7 |
| 60 | 8 |
| 61 | 9 |
| 62 | + |
| 63 | / |
Working on something related? Browse every free developer tool on the site, including a Base64 to JSON decoder, JSON minifier, JWT decoder, and URL encoder. Everything runs entirely in your browser, so nothing you paste is ever uploaded.
JSON and Base64 are both widely used in web APIs and authentication systems. JSON provides structured, human-readable data. Base64 provides a way to carry that structured data through channels that expect plain text. The combination appears most often in JWT tokens, where the header and payload are both Base64-encoded JSON objects, and in OAuth 2.0 flows where configuration objects are passed as URL parameters. This converter validates your JSON first, so you get a reliable encoding with no hidden syntax errors in the payload.