Y→J

YAML to JSON

Convert YAML config files into JSON, with precise error line/column reporting.

yaml-to-json.tool
0 chars
JSON output will appear here
Nothing you paste here is ever sent to a server - conversion happens locally in your browser.
Overview

What is a yaml to json?

This tool converts YAML into JSON - useful since YAML is common in config files (Docker Compose, Kubernetes, CI pipelines) but JSON is what most code actually consumes. It correctly handles nested structures, lists, comments (which are simply ignored, as in YAML itself), and YAML's various null representations.

Quick start

How to use this tool

  1. 1Paste your YAML, or upload a .yaml or .yml file.
  2. 2Click Convert.
  3. 3If the YAML has a syntax error, the exact line and column are shown.
  4. 4Copy the JSON or download it as a .json file.
Where it helps

Common use cases

Converting a Kubernetes manifest or Docker Compose file into JSON for tooling that needs it
Reading a CI/CD pipeline config as structured JSON
Debugging a YAML file by seeing its actual parsed structure
Migrating configuration from YAML to a JSON-based system
Good to know

Frequently asked questions

What happens to comments in the YAML?

They're ignored during parsing, exactly as YAML itself treats them - comments don't appear in the resulting JSON since JSON has no concept of comments.

Does it handle YAML's different ways of writing null?

Yes - both `~` and the word `null` are recognized as YAML null and converted to JSON null.

Can it parse lists and nested objects?

Yes - YAML's indentation-based lists and nested mappings are converted into JSON arrays and objects respectively, at any depth.

Is my YAML uploaded anywhere?

No - parsing happens entirely in your browser, whether you paste the YAML or upload a file.

quick_facts.json

{

"runs_in_browser": true,

"data_sent_to_server": false,

"signup_required": false,

"price": "free",

"category": "Encoding"

}

Related tools

B64
No signup
Base64 Encoder

Encode text to Base64, with correct Unicode handling.

Open tool
B64
No signup
Base64 Decoder

Decode Base64 back to readable text, with correct Unicode handling.

Open tool
URL
No signup
URL Encoder

Percent-encode URLs and query strings, component or full-URI mode.

Open tool