About YAML to JSON
YAML to JSON is useful when a Kubernetes manifest, a GitHub Actions workflow, a Docker Compose file or an OpenAPI spec has to be fed to something that only speaks JSON, or when you want to see what your indentation really means. Paste the YAML or open a .yaml file and the JSON appears next to it as you type. When the YAML holds a list of records, JSON to CSV can turn the JSON into rows for a spreadsheet.
It doubles as a validator: a bad indent or a stray tab gives a message pointing to the line, so you can fix it before a deploy fails. Anchors, aliases and << merge keys are expanded, dates become ISO strings, and a file with several documents separated by --- becomes a JSON array. The conversion runs on our server in memory; nothing is stored and it isn't counted as a task.
How to use YAML to JSON
- 1Paste or open YAML
Paste into Input, drop a .yaml or .yml file on it, or click Example to see how it works.
- 2Fix any errors
If the YAML to JSON conversion stops, the message names the line near the mistake.
- 3Copy the JSON
Click Copy, or Save to download the result as a .json file.
Why use Cubfile for this
- Syntax check included
Indentation errors, tabs and unclosed quotes are caught with a line number.
- Anchors expanded
&anchors, *aliases and << merge keys are resolved, so the JSON shows the final values.
- Multi-document files
Documents separated by --- are returned together as a JSON array.
- Instant and uncounted
Results appear as you type and don't use your daily tasks.