What is the difference between standard Base64 and URL-safe Base64url?
Standard Base64 uses + and / and adds = padding. URL-safe Base64url replaces + with - and / with _ and usually omits the = padding so the string is safe to drop into a URL or filename without percent-encoding. Toggle URL-Safe in this tool to produce the Base64url variant — useful for query parameters, JWT-style tokens, and S3 object keys.
How do I encode JSON for a Kubernetes Secret data field?
Paste the JSON (for example a service-account key or a config blob), click Encode, and copy the resulting Base64. Place it under data: in your Secret manifest. Important: use the standard Base64 output (URL-Safe off). Kubernetes data fields require standard Base64 — using Base64url will fail validation. If you do not want to encode by hand, set the value under stringData: instead and Kubernetes encodes it for you.
Why is my JSON minified before encoding?
Whitespace adds bytes that translate into a longer Base64 string with no semantic value. Minifying first produces the smallest possible token, which matters when the result will live in a query string, JWT, or HTTP header. The decoded bytes still parse to the exact same JSON object.
Does this handle non-ASCII characters in JSON correctly?
Yes. Multi-byte UTF-8 characters (emoji, accented letters, CJK glyphs) are encoded as UTF-8 bytes before Base64 — using the btoa(unescape(encodeURIComponent(s))) idiom — so the round-trip preserves them exactly. Naive btoa() alone would throw on any character above U+00FF.
Can I use this output as a JWT?
It produces a JWT-style payload segment but not a complete JWT. A JWT is three Base64url segments joined by dots (header.payload.signature) and the signature requires a secret or private key. Use this tool to encode the payload, then sign it with a JWT library — or use a dedicated JWT issuer.
Is the encoded Base64 safe to put in a URL query string?
Standard Base64 contains + and / which must be percent-encoded inside URLs. Toggle URL-Safe to emit Base64url (- and _ with no padding) — that variant drops directly into a query string without any further escaping.
How do I decode this back to JSON?
Use the Base64 to JSON tool — paste the Base64 string and it decodes, parses, and pretty-prints. The decoder accepts both standard Base64 and Base64url, so either output from this encoder works as input there.
Is my JSON sent to a server before encoding?
No. Validation, minification, UTF-8 encoding, and Base64 conversion all run inside your browser tab. Service-account keys, API tokens, and customer data stay local — verify in DevTools Network tab that no request fires when you click Encode.