Sign up free

YAML to JSON Converter

Paste a YAML config, see it as JSON instantly and find syntax mistakes by line number.

or drop files here

Accepts YAML

Encrypted upload. Files are deleted automatically after 1 hour.

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

  1. 1
    Paste or open YAML

    Paste into Input, drop a .yaml or .yml file on it, or click Example to see how it works.

  2. 2
    Fix any errors

    If the YAML to JSON conversion stops, the message names the line near the mistake.

  3. 3
    Copy 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.

FAQ

YAML to JSON: questions and answers

Why did YAML to JSON turn no into false?
The parser follows YAML 1.1, where yes, no, on and off are booleans. Put the value in quotes, as in country: "NO", if you mean the text.
Can I use YAML to JSON to validate a config?
Yes. If the JSON appears, the YAML parsed. If not, the message tells you roughly which line to look at, which is often where the indentation goes wrong.
Is my YAML stored on your server?
No. It's sent over HTTPS, converted in memory and sent straight back, and nothing is saved. Even so, leave live passwords and tokens out of anything you paste online.
What happens to comments?
JSON has no comments, so they're dropped. Keys keep the order they had in the YAML. A tool for turning JSON back into YAML is listed under Spreadsheet & Data Converter.
Is there a size limit when converting YAML to JSON?
Up to 1,000,000 characters per conversion. It's free, needs no account and doesn't count toward the daily task limit.
Share YAML to JSON with a friendIt runs in any browser, and they can try it without signing up.

Related tools

XLSSQL Excel to SQLGenerate CREATE TABLE and INSERT statements from Excel or CSV.
XMLXLS XML to ExcelTurn repeating XML records into spreadsheet rows.
CSVXLS CSV to ExcelOpen CSV and TSV data in Excel with the right columns and encoding.
CSVJSON CSV to JSONConvert CSV to JSON in your browser. Nothing is uploaded.
CSVXML CSV to XMLConvert CSV or Excel rows into XML records.
XLSCSV Excel to CSVSave each sheet as CSV, line breaks in cells handled.
XLSHTML Excel to HTMLTurn a sheet into an HTML table you can paste into a page.
XLSJPG Excel to ImageSnapshot sheets and charts as images.