Plain ASCII
- Input
- hello world
- Result
- aGVsbG8gd29ybGQ=
The trailing = is padding, not part of the data.
Convert text to Base64 and back. Handles non-ASCII text correctly, supports the URL-safe alphabet used by JWT, and tells you when the payload is binary rather than quietly mangling it.
Runs entirely in your browser. This page is a static file. Whatever you type stays in the tab, is never sent to a server, and is gone when you close it — so pasting a real token or config is safe.
kubectl get secret shows you the encoded form.The trailing = is padding, not part of the data.
Each Hangul character becomes 3 UTF-8 bytes. Tools that use btoa() throw an error here.
No padding and no + or / characters, so it survives being placed in a URL.
It is an encoding, fully reversible by anyone. A Kubernetes Secret is Base64-encoded, not protected — treat its contents as plaintext in your threat model.
JWT segments use - and _ and drop padding. A strict standard decoder rejects them. Convert the alphabet and re-pad to a multiple of 4 first.
echo "secret" | base64 encodes a trailing newline too. Use echo -n or printf when the value must match exactly.
Base64 represents 3 bytes with 4 characters, so output grows by roughly 33%, plus padding. That overhead is the cost of moving binary data through a text-only channel.
The page is static and the conversion happens in JavaScript in your tab. Nothing is transmitted. You can verify this by opening your browser's network panel while you type.
Encode with printf '%s' 'text' | base64 and decode with base64 -d. On macOS the decode flag is -D. For URL-safe output add | tr '+/' '-_' | tr -d '='.