How do I decode a Kubernetes Secret value?
Run kubectl get secret <name> -o yaml. Each value under data: is a Base64 string. Copy a single value (everything after key:), paste it here, and click Decode. The decoded YAML — or any text content — appears in the output panel. Equivalent CLI: kubectl get secret <name> -o jsonpath="{.data.<key>}" | base64 -d, but no terminal is required here.
Why does Kubernetes Base64-encode secrets if it does not encrypt them?
Base64 is encoding, not encryption. Kubernetes uses Base64 because Secret values can contain arbitrary bytes (binary keys, certificates, multi-line YAML configs) that would otherwise need escaping inside the YAML manifest. Encryption-at-rest in etcd is configured separately via EncryptionConfiguration. Anyone with API access to the Secret can decode it instantly — that is by design.
What is the difference between data and stringData?
data: holds Base64-encoded values — what you decode here. stringData: lets you write raw text and Kubernetes encodes it for you on apply. When you read the Secret back via kubectl, both end up under data: as Base64. So whether the manifest used data or stringData, the round-trip lands here as Base64.
How do I decode every value in a Secret at once?
For batch decoding, kubectl get secret <name> -o go-template='{{range $k,$v := .data}}{{$k}}: {{$v | base64decode}}{{"\n"}}{{end}}' shells out everything at once. This tool handles one value per run, which matters when only some entries are YAML and others are PEM keys, JSON, or binary.
Does this support Base64url variants?
Yes. The decoder normalises - to + and _ to / and re-pads if needed. Some GitOps tools and ExternalSecret backends emit URL-safe Base64 — paste either flavour and it decodes.
My decoded value contains tabs — is that valid YAML?
No. YAML forbids tabs as indentation. If a Secret-stored YAML contains tabs the original was already broken — common when an editor silently inserted them. Run the decoded text through the YAML Validator to confirm it parses.
What if the decoded value is not YAML at all?
The decoder shows the raw decoded text whatever it is. Secrets often hold PEM certificates, JSON service accounts, plain database URLs, or htpasswd files — none of which are YAML. Use the matching tool (Base64 to JSON, plain Base64 decoder) for non-YAML payloads.
Is the Secret value sent anywhere?
No. atob and the UTF-8 conversion run inside the browser tab. Kubernetes Secret values often contain database passwords, cloud credentials, or signing keys — verify in DevTools Network tab that nothing leaves the page when you click Decode.