JSON to Base64 Encoder

JSON packed into a single Base64 line — safe for variables, headers and URLs.

Reverse: Base64 to JSON

Files never leave your device — everything runs in your browser

Some places accept only plain text without quotes, braces or line breaks: environment variables, HTTP headers, Kubernetes secrets, URL parameters, CI settings. The usual answer is to encode the JSON as Base64. The converter first removes all whitespace from the JSON, encodes it as UTF-8 so any language and emoji survive, and then writes Base64.

The standard alphabet uses + and / with = padding. Switch on URL-safe to get - and _ without padding — the variant used in URLs and JWT tokens. The data URL option adds data:application/json;base64, in front, so the result can be used directly as a link or a src attribute.

Large integers are encoded exactly as written, without rounding. To check the result or decode a value you received, use Base64 to JSON.

Nothing is uploaded: everything runs inside your browser, so API responses, configs, contact lists and datasets stay on your device.

Options

How to encode JSON to Base64 in 3 steps

  1. 1

    Load the JSON

    A file, pasted text or the Sample; errors are reported before encoding.

  2. 2

    Pick the variant

    Standard or URL-safe alphabet, plain Base64 or a data URL.

  3. 3

    Copy the line

    Copy the Base64 string or download it as a text file.

Frequently asked questions

Load the JSON; the Base64 line appears immediately and can be copied or downloaded.
No. Base64 only changes the representation — anyone can decode it. Do not use it to hide secrets.
In URLs, file names and tokens, where + and / would be misread. URL-safe uses - and _ instead.
Use Base64 to JSON: it accepts both alphabets, data URLs and even gzip inside.

Related tools