Loading Base64 to YAML Converter...
Please wait a moment

How to Convert Base64 to YAML

YAML gets wrapped in Base64 whenever it has to travel as a single line: inside a Kubernetes Secret, a CI variable or a stored setting. Paste the string below to read the file again and save it as .yaml.

Step 1

Paste the Base64 string

Paste the string into the input panel, or upload a .txt, .b64 or .base64 file that holds it. The Sample button loads a short telecom plan config so you can see how it works. Values copied out of Kubernetes Secrets can be pasted as they are. Going the other way? YAML to Base64 encodes a file into one line.

Example: Try This Base64 Encoded YAML

Copy and paste this string to see how it works:

IyBTZXJ2ZXIgQ29uZmlndXJhdGlvbgpzZXJ2ZXI6CiAgbmFtZTogTWFpbiBBUEkKICBob3N0OiBsb2NhbGhvc3QKICBwb3J0OiAzMDAwCiAgZW52aXJvbm1lbnQ6IHByb2R1Y3Rpb24KZGF0YWJhc2U6CiAgdHlwZTogcG9zdGdyZXNxbAogIGhvc3Q6IGRiLmV4YW1wbGUuY29tCiAgcG9ydDogNTQzMgogIGNyZWRlbnRpYWxzOgogICAgdXNlcm5hbWU6IGFkbWluCiAgICBwYXNzd29yZDogc2VjdXJlMTIz
Step 2

Read the decoded YAML

A moment after you paste, the YAML appears in the output panel exactly as it was encoded. A green Valid YAML badge means it parses; otherwise a note gives the line and column of the problem. Broken Base64 gets the line and column of the bad character instead. For a closer look at a file that fails, paste the decoded text into the YAML Validator.

Decoded YAML Output

The example above decodes to this, comment and all:

# Server Configuration
server:
  name: Main API
  host: localhost
  port: 3000
  environment: production
database:
  type: postgresql
  host: db.example.com
  port: 5432
  credentials:
    username: admin
    password: secure123
Step 3

Copy or download it

Copy the text or download it as a .yaml file. Both hold the decoded text byte for byte, ready for kubectl, Helm or your CI job.

•
Checking a Secret before you apply it: see which keys and values really ended up in the cluster.
•
Debugging a CI job: decode the variable the pipeline reads and compare it with the file you meant to store.
•
Reading it as data: YAML to JSON shows the same config as JSON.

What is Base64 to YAML Conversion?

Base64 turns any bytes into letters, digits, + and /, which is why tools use it to carry a whole YAML file through a secret or a variable. Decoding reverses that: the bytes come back and are read as text again.

This page shows that text without touching it and runs a YAML parser over it as a check. It does not check what the keys mean, so a manifest with a misspelled field still counts as valid YAML.

Frequently Asked Questions

Where does Base64-encoded YAML usually come from?

Mostly from places that want one clean line of text. The data field of a Kubernetes Secret, a GitHub Actions or GitLab CI variable, a Helm values file passed through --set-file or a secret manager, and app settings stored in a database column all tend to hold whole YAML files as Base64. Paste the string here when you need to see what was actually stored.

I ran kubectl get secret -o yaml. Which part do I paste?

Paste the value next to a key under data:, the long string of letters and digits. It works with or without the quotes around it, and so do line-wrapped Base64 from the base64 command, URL-safe Base64 with - and _, and a data URI. The stringData: section of a manifest is already plain text, so it needs no decoding.

Is the decoded YAML reformatted or changed in any way?

No. The Base64 is turned back into bytes and read as UTF-8, and that text is shown as it is. Comments, indentation, quoting, anchors and aliases, --- separators between documents and Windows line endings all stay put, and values like 00501, 14.50, 0x1F, 2024-01-15 or 8901240544102066246 keep their exact spelling. Copy and the .yaml download give you the same text, including a byte-order mark if the original had one.

What does "Not valid YAML" mean when the text decoded fine?

After decoding, the text is read with a YAML parser, every document of it. If that fails you see the line and column of the first problem, for example bad indentation or a duplicate key, but the decoded text is still shown so you can fix it. Custom tags such as CloudFormation's !Ref are flagged too, because a plain YAML reader doesn't know them. If the bytes turn out to be an image, a PDF or an archive, Base64 to File can save them.

Does Base64 protect the passwords in my Secret?

No. Base64 is an encoding, not encryption, and anyone with the string can read it in a second, exactly as this page does. Kubernetes stores Secret data as Base64 by default, so tokens and passwords in it are only as safe as the access rules on the cluster. Use encryption at rest or a real secret store for anything sensitive.

Is the YAML I decode sent anywhere?

No. Decoding and the YAML check run in your browser, and the download is built on your own machine. Nothing is uploaded and nothing is kept, so a reload starts with an empty editor. The Share button is the one exception: when you click it, the Base64 is saved on our server so the link can open it.

Related pages: YAML to Base64 · YAML Validator · Base64 to File