MergeJSON

JSON to Base64 Online.

Encode JSON as standard or URL-safe Base64, decode Base64 back to valid JSON, generate data URIs, wrap raw Base64 lines, and minify JSON before encoding. Everything stays in your browser.

No signup / No uploads / Encode and decode

Base64 output

// Base64 output appears here.

Convert JSON to Base64 online

A JSON to Base64 tool converts valid JSON text into a Base64 string that can be copied into APIs, test fixtures, config values, data URIs, tokens, or encoded examples. Paste JSON above, choose standard Base64 or URL-safe Base64, and copy the encoded result. The converter validates JSON before encoding so broken input does not become confusing encoded output.

How to encode JSON to Base64

  1. Paste JSON into the input box or load the sample.
  2. Choose encoding options - standard, URL-safe, data URI, wrapping, and minify before encode.
  3. Encode and copy the Base64 output or download it as a text file.

Decode Base64 to JSON on the same page

Switch to Base64 to JSON mode when you need the reverse conversion. The decoder accepts standard Base64, URL-safe Base64, wrapped Base64, and JSON data URIs, then validates the decoded text as JSON. You can pretty-print or minify the decoded JSON before copying it.

URL-safe Base64, data URIs, and line wrapping

URL-safe Base64 is useful for query strings, URL paths, and systems that do not want +, /, or padding characters. Data URI output creates a copy-ready data:application/json;base64 value. Raw Base64 can be wrapped at 64, 76, or 120 characters per line for systems that expect chunked output.

Minify JSON before Base64 encoding

Minifying before encoding removes whitespace from the JSON text first, which usually produces a shorter Base64 string. Turn minify off when you want the decoded result to preserve readable indentation. You can also use JSON Minifier, JSON Formatter, or JSON Validator before encoding. For a full walkthrough, read how to convert JSON to Base64.

FAQ

JSON to Base64, answered.

How do I convert JSON to Base64 online? +

Paste valid JSON into the JSON to Base64 tool and press Encode JSON to Base64. The tool validates the JSON, optionally minifies it, then encodes the JSON text as Base64 in your browser.

Can I decode Base64 back to JSON on the same page? +

Yes. Switch to Base64 to JSON mode, paste standard Base64, URL-safe Base64, or a data URI, and the tool decodes the text back into validated JSON.

Does the tool support URL-safe Base64? +

Yes. Choose URL-safe Base64 to replace plus and slash characters with hyphen and underscore and remove padding. Decode mode can auto-detect URL-safe Base64.

Can I create a JSON data URI? +

Yes. Enable Output data URI to generate a data:application/json;base64 URI. You can also choose text/plain when that MIME type fits your use case better.

Can I wrap or chunk Base64 lines? +

Yes. Raw Base64 output can be left unwrapped or wrapped at 64, 76, or 120 characters per line. Data URI output stays unwrapped so the URI remains copy-ready.

Is my JSON uploaded when encoding or decoding? +

No. JSON to Base64 and Base64 to JSON both run entirely in your browser. Your data is never uploaded, stored, logged, or sent to a server.