Skip to content
utilnook

YAML to JSON Converter

Convert YAML to JSON and JSON to YAML in your browser. Handles anchors, multiple documents and CloudFormation tags, and keeps big numbers exact.

Valid YAML, converted to JSON.

Runs in your browser. Nothing you enter is uploaded.

How to use

This tool converts YAML to JSON and JSON back to YAML as you type, and checks that the input is valid.

  1. Paste YAML into the box, or Open a file. Open the JSON to YAML tab to go the other way; opening a .json file goes there itself. Switching tabs carries the result over, so a round trip takes two clicks.
  2. The converted text appears next to it. Copy it, or Download it as a .json or .yaml file.
  3. If the input has a mistake, the tool says what is wrong and where. Click the line and column to jump to it.

What the YAML to JSON side handles:

When writing YAML, strings that older YAML readers could take for something else, like yes, no or 2026-10-12, are quoted. Choose 2 or 4 spaces of indentation. Keys keep their order, or sort them if you like.

Frequently asked questions

Is all JSON valid YAML?

Almost. YAML 1.2 was designed so that JSON documents are also valid YAML, so you can usually paste JSON into a YAML file as it is. Converting it to proper YAML makes it shorter and easier to read.

Why were my comments removed?

JSON has no comments, so they can't be carried over. Converting the JSON back to YAML won't bring them back, so keep your original file.

Why is yes written as 'yes' with quotes?

Older YAML readers, which follow YAML 1.1, read yes, no, on and off as true or false. Quoting them keeps them as text in every YAML reader.