🔓 Decoded entirely in your browser

Kubernetes Secret Decoder

Paste the output of kubectl get secret NAME -o yaml and every value under data: gets base64-decoded at once. Also works in reverse — build a Secret's data: block from plain key/value pairs.

How it works

Decoding parses the pasted YAML with js-yaml, then for each key under data: runs the value through atob() to get raw bytes and re-decodes those bytes as UTF-8 with TextDecoder — rather than trusting atob()'s output directly, which mangles any character outside Latin-1 — while stringData: values are already plain text and are passed through unchanged; building a Secret does the reverse, encoding each value's UTF-8 bytes with TextEncoder before btoa().

FAQ

Why not just use atob() directly on the decoded value?
atob() decodes base64 into a raw byte string interpreted as Latin-1, so any UTF-8 character above code point 127 — accented letters, emoji, some punctuation — comes out corrupted; re-decoding those bytes with TextDecoder('utf-8') gets the original text back correctly.
What's the difference between the data: and stringData: fields it reads?
data: holds base64-encoded values, which is what kubectl get secret -o yaml actually outputs; stringData: is a write-only convenience field for plain text that Kubernetes base64-encodes on your behalf — this tool decodes the former and passes the latter through as-is.

Free, unlimited, no account. If this saved you a paid tool, a small thanks is appreciated.

Say thanks — $3