Validate YAML and encode it to Base64 in one step.
Loading the tool...
How to use YAML to Base64
Paste your YAML.
Tick URL-safe if you need it for a token or a URL.
Copy the Base64 string.
About YAML to Base64
Kubernetes secrets and many CI systems expect values as Base64. If you have a config file in YAML, you often need to turn it into one Base64 string for a secret or a variable.
The YAML is checked for syntax errors before it is encoded, so you do not end up with a perfectly encoded document that nobody can read. Line breaks are kept, since they are part of the YAML structure.
Frequently asked questions
Does the encoding change my YAML?
The text is encoded as it is, with only the whitespace between XML tags removed in the case of XML. Decoding gives it back.
Is this secure?
No. Base64 is an encoding, not encryption, and anybody can reverse it. Do not rely on it to protect secrets.
How do I turn it back?
Use the Base64 to YAML tool, which decodes the string and formats the YAML.
Why URL-safe?
Standard Base64 contains + and / which have special meanings in URLs. URL-safe replaces them with - and _.