YAML ↔ JSON Converter
Convert YAML to JSON or JSON to YAML, validate a YAML file with the line number of any error, or reformat it with clean indentation. Multiple documents (---) are supported.
Free, no sign-up
Your data stays on your device
Works offline after first open
The tool
Loading the tool…
How to use
- Choose the direction: YAML → JSON, JSON → YAML, or validate and format YAML.
- Paste the text or drop a .yaml, .yml or .json file.
- If there is an error we show the line and column.
- Copy or download the result.
Privacy & how it works
Processes your data in the browser and stores nothing.
- Engine: jsyaml (open-source libraries bundled with the site).
- Works offline after you open it once.
Frequently asked questions
Is reading safe for files from unknown sources?
Yes. We use the YAML core schema, which only reads strings, numbers, lists and maps, with no types that run code, and we cap aliases (&/*) at 1,000.
Why did yes stay a string instead of true?
We follow YAML 1.2: booleans are only true and false. yes, no and on stay as text.
What about a file with several documents (---)?
It becomes a JSON array with one item per document. When formatting, they are written back as separate documents.
Why did my comments disappear?
JSON has no comments, and any conversion or reformat rewrites the file from its data, so YAML comments are lost.
Related tools
JSON Formatter & ValidatorPretty-print JSON or minify it to one line, sort keys alphabetically, validate it with the exact line, column and cause of any error, or escape and unescape JSON strings.JSON Viewer & JSONPath QueryBrowse JSON as a collapsible tree, search keys and values, and pull out what you need with a JSONPath query like $.items[?(@.price > 10)].name, copying any path or value.JSON DiffCompare two JSON files by structure, not text: see every key that was added, removed or changed with its full path, ignoring key order and whitespace, with an option to ignore array order.JSON Flatten & UnflattenTurn nested JSON into a flat object with keys like address.city or items[0].name, or rebuild the original structure from flat keys. Handy for translation files, configs and spreadsheets.