JSON to Base64
Paste or drop your data here, or open a file.
New to Bracely?
Everything stays in your browser.
Output appears here
Paste or open your data in the input box. It never leaves your browser.
JSON to Base64
Turn JSON into one Base64 string you can put where only plain text fits: a Kubernetes secret, a CI variable, an HTTP header or a URL. The JSON is minified first, so the result is as short as it can be.
Example: a config for a CI secret
CI systems and Kubernetes secrets keep values as single-line text, so a JSON config is usually stored as Base64. The JSON is minified first, which is why the result is shorter than encoding the pretty-printed text:
Input
{
"apiUrl": "https://api.example.com",
"retries": 3,
"features": {
"search": true,
"export": false
}
}Output
eyJhcGlVcmwiOiJodHRwczovL2FwaS5leGFtcGxlLmNvbSIsInJldHJpZXMiOjMsImZlYXR1cmVzIjp7InNlYXJjaCI6dHJ1ZSwiZXhwb3J0IjpmYWxzZX19
How do I use the JSON to Base64?
- Paste JSON (or any text).
- Pick standard or URL-safe Base64, and whether to encode the whole input or each item.
- Copy the Base64.
What does the JSON to Base64 do?
- JSON minified before encoding
- Standard and URL-safe (Base64URL) alphabets
- Each array item or line encoded on its own if you want
When to use the JSON to Base64
Base64 turns any bytes into letters, digits and two symbols, so data can travel where only plain text is allowed. JSON gets encoded this way all the time: Kubernetes secret values, CI and cloud secret variables, HTTP headers such as an encoded user context, data: URIs and fields inside other JSON.
Bracely minifies the JSON before encoding, so the result is as short as it can be, and encodes text as UTF-8, so ₹ or é survive the round trip. Standard Base64 uses + and / and = padding; pick the URL-safe alphabet (Base64URL: - and _, no padding, as JWTs use) when the value goes into a URL, a cookie or a file name. Each item encodes every array item or line on its own, for a list of secrets.
Frequently asked questions
- Is Base64 encryption?
- No. Anyone can decode it, here or with base64 -d. It only changes how the bytes are written. To keep a value secret, encrypt it (Encrypt text or Encrypt fields) and then encode it if it still has to be text.
- How do I put it in a Kubernetes secret?
- Use the Base64 as a value under data: in the Secret's YAML. kubectl create secret generic does the same encoding for you from a file or a literal.
- Is my data uploaded?
- No. Bracely runs entirely in your browser, so nothing you paste or open leaves your device.
More JSON tools
Bracely has 104 JSON tools in one page. Related ones:
- JWT Decoder
- JSON Escape
- Base64 to JSON
- Certificate decoder
- Unescape JSON
- URL encode / decode
- HTML entity encoder
- GZIP decompress
- Escape text for JSON
- Slug generator
- QR code generator
- Webhook signature
- Mask JSON data
- JSON PII scanner
- Postman collection runner
- OpenAPI response validator
- JSON Formatter
- JSON Validator
- JSON Viewer
- JSON Repair
- JSON Diff
- JSON to YAML
- JSON to CSV
- jq Playground
Runs entirely in your browser. Nothing you paste is uploaded. Made by Saurabh Pagrut · About · Privacy policy
Last updated · Version 6.1 · Changelog
Saurabh Pagrut on GitHub · LinkedIn · X · YouTube · Instagram