Free tool

YAML to JSON, and back.

Paste a workflow, a manifest or an OpenAPI spec and get the other format. YAML is read by the 1.2 rules, so no stays Norway and a bare date stays the text you typed — and when it does not parse you get the line, the column and the reason.

YAML
548 B in648 B out
JSON

Valid YAML

Publishes the converted config to Comma: one URL for the manifest under review, comments anchored to the exact line, and every re-publish kept as a revision. Free, no card.

The Norway problem

YAML 1.1 treated yes, no, on, off, y and n as booleans, and any bare YYYY-MM-DD as a timestamp. Convert a list of country codes with a 1.1 parser and NO comes out as false; convert a release date and it comes back with a time zone attached. GitHub Actions is the everyday victim — its on: key is why some converters print true: at the top of a workflow.

This page reads YAML with the 1.2 core schema, where only true, false, null and numbers are special. Everything else you did not quote is a string, which is what you meant. Going the other way, strings that would be misread by an older parser are written with quotes.

What does not survive the trip

JSON has no comments, no anchors and no multi-line block scalars, so YAML → JSON drops comments, expands every alias into a full copy, and turns a | block into a string with \n in it. The data is identical; the authoring conveniences are gone. If you need the comments to reach a reviewer, share the YAML itself — a published report keeps every line, and the reviewer can comment on the one they are worried about.

When the config should be a report

Pasting a 300-line manifest into a chat thread loses the indentation that gives it meaning. Published to Comma it keeps its shape, reviewers anchor comments to the line in question, and the next version lands as a revision you can diff. An agent can publish it for you over the MCP server.

Questions

How do I convert YAML to JSON online?
Paste the YAML into the editor or open a .yml or .yaml file with YAML → JSON selected. It is parsed and printed as indented JSON on the right; copy it or download a .json file. Comments are dropped, because JSON has no comments. Nothing installs and nothing is uploaded.
How do I convert JSON to YAML?
Click the swap button or choose JSON → YAML, then paste the JSON. You get block-style YAML with two- or four-space indentation, strings quoted only where YAML would otherwise misread them, and keys optionally sorted. Swapping direction carries the current output across as the new input.
Why does no stay a string instead of becoming false?
Because this converter reads YAML with the YAML 1.2 core schema. The older YAML 1.1 rules turned no, off, y and n into booleans and bare dates into timestamps, which is how a list of country codes loses Norway. Under 1.2 only true, false and null are special, and a date you did not quote stays exactly the text you wrote.
Does it handle files with several documents?
Yes. A YAML stream split by --- lines, like a multi-resource Kubernetes manifest, converts to a JSON array with one element per document. The status line tells you how many documents were found so a stray separator is easy to spot.
Can I use this as a YAML validator?
Yes. If the YAML does not parse you get the line and column, the offending line with a caret under the character, and the parser's reason — a bad indent, a tab where spaces were expected, an unclosed quote or a duplicated key. Duplicate keys are an error here, not a silent overwrite.
What happens to anchors and aliases?
They are resolved. An alias like *defaults is replaced by a copy of the anchored value, and merge keys (<<: *defaults) are expanded into the mapping, so the JSON contains the data the YAML actually describes. Going the other way, repeated objects are written out in full rather than as anchors.
Is my file uploaded anywhere?
No. Parsing and conversion run in your browser. The text only leaves your machine if you choose Get a shareable link, which publishes it as a Comma report whose access you control.

Related: JSON formatter · JSON to HTML table · JWT decoder · diff two files · all free tools