Kubernetes Secret Encoder

base64-encode values into a Secret manifest, in your browser. base64 is encoding, not encryption: anyone who can read the manifest can read the value, so read the findings before this goes near a repository.

Nothing you type leaves your browser. stringData keeps the values readable and the API server encodes them on write, which is exactly as unencrypted.

Paste below, or drop a file anywhere on this panel

Or drop a file anywhere on this panel. Nothing is uploaded: the analysis runs in this tab.

The answer appears here

Paste on the left and press Encode. Nothing leaves this tab.

Examples

Real input you can load into the tool above. Each one shows a different thing going wrong, because that is what the tool is for.

Encoding a credential

The manifest, plus the reminder that base64 protects nothing

password: hunter2
api-key: abc123

A TLS pair

The two keys a kubernetes.io/tls Secret must carry

tls.crt: PEM CONTENT HERE
tls.key: PEM CONTENT HERE

Common mistakes

These are the ones that fail silently. The config is accepted, nothing raises an error, and the consequence arrives later.

  1. Believing the output is protected

    base64 is encoding. Anyone reading the manifest reads the value.

    Instead:Encrypt before committing, with Sealed Secrets or SOPS.

  2. Committing the generated manifest

    The whole point of the encoding is transport, not secrecy. A repository scanner recovers it instantly.

    Instead:Generate at deploy time, or commit only encrypted output.

  3. Adding a trailing newline to the value

    Encoding a value with a newline gives a credential with a newline, and the failure is an authentication error with no clue.

    Instead:Trim before encoding. echo -n rather than echo.

base64 is not encryption, and a Secret is not encrypted at rest by default

Both halves matter. `base64 -d` is the whole attack on a manifest, and without an EncryptionConfiguration on the API server, Secrets sit in etcd base64-encoded and nothing more.

A Secret in git is a credential published permanently

Anyone with repository access has it, and so does every clone, every fork and every backup, including after it is deleted from the branch: git keeps history. Rotating the credential is the only remedy once it has been pushed. Sealed Secrets, External Secrets and your platform's own secret store all put an encrypted or referenced value in git and the real one only in the cluster.

RBAC on Secrets is coarser than people expect

A ServiceAccount granted `get secrets` in a namespace can read every Secret in it, not only the ones it mounts. That is worth checking before deciding a Secret is adequately protected: the RBAC analyzer on this site shows what a binding actually grants.

What this cannot see

Whether your cluster has encryption at rest enabled, which is an API server flag. Whether the value is a real credential or a placeholder. And it cannot stop you committing the output, which is the risk this tool exists alongside rather than solves.

More kubernetes tools

Kubernetes YAML Generator Answer a few questions, get a manifest Kubernetes YAML Validator Is this YAML valid, and where is it wrong? Kubernetes Rollout & Probe Timing Restart loops, capacity dips and stuck drains Kubernetes Service Checker Will this Service have any endpoints? Kubernetes Network Policy Viewer What can reach what, and what just broke Kubernetes Manifest Diff What actually changed Kubernetes Resource Calculator What these manifests actually reserve Kubernetes RBAC Viewer Who can actually do what Kubernetes Deployment Generator See the capacity dip before you deploy Kubernetes Service Generator port, targetPort, and which one you meant Kubernetes StatefulSet Generator Stable names, and volumes that outlive you Kubernetes QoS Class Calculator And where you sit in the eviction order Kubernetes Node Capacity Planner Allocatable is not capacity Kubernetes Max Pods per Node Calculator The ENI limit, not the 110 default Kubernetes Label Selector Tester Which key failed, not just that one did Kubernetes Taint & Toleration Tester Tolerations permit, they do not attract Kubernetes Resource Name Validator RFC 1123 subdomain, label, or 1035 Kubernetes Label & Annotation Validator Why your image tag is not a legal label Kubernetes CrashLoopBackOff Guide The status is a timer, not a cause Kubernetes TLS Certificate Decoder When it expires, and what it covers Kubernetes ServiceAccount Token Decoder Bound or legacy, and when it dies Kubernetes imagePullSecret Generator The registry URL nobody gets right Kubernetes cert-manager Certificates Issuer scope, and the rate limit that costs a week Kubernetes Flux HelmRelease Generator With the source it cannot work without Kubernetes Helm Chart Generator Chart.yaml, values, and working templates Kubernetes Argo CD Application Generator The defaults that are off, turned on Kubernetes Ingress Generator pathType, and the TLS secret that fails quietly Kubernetes HPA Generator Why it says unknown and never scales Kubernetes SecurityContext Generator Pod level, container level, and which wins Kubernetes Probe Generator How long it gets to start before liveness kills it Kubernetes PVC Generator Access modes your storage can actually do Kubernetes ResourceQuota Generator And the LimitRange that stops it breaking deploys Kubernetes CronJob Generator The fields that decide whether it runs Kubernetes NetworkPolicy Generator With the DNS rule already in it Kubernetes RBAC Generator And what it actually grants Kubernetes PodDisruptionBudget Generator Can this budget ever be satisfied? Kubernetes API Deprecation Checker What breaks on the next upgrade Kubernetes Kubeconfig Viewer Read it without handing it to anyone Kubernetes Quantity Parser What 512Mi, 100m and 1e3 actually mean Kubernetes Multi-Document YAML Splitter One file per object, in apply order Kubernetes .env to ConfigMap & Secret Split the credentials out on the way Kubernetes Secret Decoder See what is actually in there Kubernetes Ingress to Gateway API Which annotations silently stop working Kubernetes Manifest Visualizer What points at what, and what points at nothing Kubernetes Patch Tester Which --type, and what it deletes Kubernetes kubectl JSONPath Tester kubectl's dialect, not generic JSONPath Kubernetes Node Affinity Tester Required excludes, preferred only scores Kubernetes Helm Values Diff A missing key is a third value Kubernetes Pod and Service CIDR Fixed at cluster creation Kubernetes API Version Checker Will this apply on that cluster Kubernetes Go Template Tester Go truthiness is not JavaScript's Kubernetes Cluster Cost Estimator At your rates, not a price table Kubernetes Kustomize Build Transformers run in kustomize's order Kubernetes Helm Chart Validator version is SemVer, appVersion is not

Elsewhere on the site