Skip to content

YAML to JSON

Convert YAML config into JSON and see exactly how each value was typed.

Quick Tool Overview

The YAML to JSON converter makes a config file's real structure and types explicit. It reads nesting, sequences, flow collections, block scalars, multiple documents and the YAML 1.1 booleans that catch people out.

What it does
Converts YAML into JSON
You give it
A YAML config file
You get back
Formatted JSON with every type made explicit
Best for
Inspecting Compose, CI, Helm and Ansible files
Developer Tools Free, unlimited use No sign-up Runs in your browser

About the YAML to JSON

Converting YAML to JSON is the fastest way to see what a config file really says. The nesting becomes explicit, the types become visible, and a key that is one indent level off its siblings stops being invisible.

The parser handles what configuration files actually contain: mappings, sequences, nesting by indentation, inline flow collections such as [a, b] and {x: 1}, literal and folded block scalars, comments, multiple documents separated by ---, and the full set of scalar types including the YAML 1.1 booleans that trip people up. When parsing fails you get the line rather than a stack trace.

Key features of the YAML to JSON

Types become visible

A value that YAML quietly read as a boolean or a number is unmistakable once it is JSON, which is the point of converting.

Block scalars supported

Both the literal | and folded > forms are read, including their chomping indicators, so embedded scripts survive.

Flow collections read

Inline forms such as [a, b] and {x: 1}, which real config files mix freely with block style, are handled.

Multi-document files

Documents separated by --- become a JSON array, so a manifest bundle converts in one pass.

Errors by line

A file that will not parse reports the line rather than a stack trace from a parser you did not write.

How to use the YAML to JSON

  1. 1

    Paste your YAML

    A Compose file, a CI pipeline, a Helm values file or anything else.

  2. 2

    Choose the indentation

    Set how the resulting JSON should be formatted, or minify it.

  3. 3

    Read the JSON

    The types become explicit, which is where most config surprises show up.

  4. 4

    Copy or download

    Take the JSON to your clipboard or save it as a .json file.

Frequently asked questions

YAML 1.1 treats unquoted yes, no, on and off as booleans. That is the language behaving as specified — quote the value if you meant the word.

Reviews of the YAML to JSON

What people who use the YAML to JSON think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the YAML to JSON. It takes half a minute and no account.

Write the first review

More developer tools