Skip to content
M2TOOLKIT

Developer · free tool

YAML to JSON Converter & Validator

Convert YAML to JSON and check that your YAML is valid.

Use it as often as you like — it's free, with no sign-up and no limits.

  • Developer
  • Free
  • No sign-up
  • Runs in your browser
  • Updated

Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us.

How to use the YAML to JSON Converter

  1. Paste your YAML into the left box, or open a file.
  2. Adjust the options if you need to.
  3. Copy the JSON or download it as a file.

What does this tool do?

YAML is popular for configuration (Kubernetes, GitHub Actions, Docker Compose) but its indentation rules are easy to get wrong. The converter validates the YAML, reports errors with line numbers, and shows the equivalent JSON so you can see exactly how it's interpreted.

Files with several documents separated by --- become a JSON array.

Why use it?

  • Catch indentation mistakes before deploying.
  • See how YAML values are really typed.
  • Convert configs for tools that need JSON.

A YAML gotcha

In YAML 1.1, unquoted values like yes, no and on were booleans. The library used here follows YAML 1.2, where only true and false are booleans — the JSON output shows you which one you've got.

Privacy

Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us. There's no account to create and nothing to install.

Frequently asked questions

Why does my YAML fail with an indentation error?

YAML uses spaces for indentation and doesn't allow tabs. Items at the same level must line up exactly. The error message shows the line number, so check that line and the one above it.

Will values like yes and no turn into true and false?

Not here. The converter follows YAML 1.2, where only true and false are booleans. Older YAML 1.1 tools treat yes, no, on and off as booleans too, so quote those values if other tools will read the file.

Last reviewed by the M2Toolkit team.

Helpful guides

Other tools people use alongside the yaml to json converter.