Skip to content
Conversion Hub

yaml → json

Convert YAML to JSON Online

Convert YAML to JSON with precise, line-numbered errors when something is wrong.

  • No uploads, ever
  • Converts in milliseconds
  • Works offline
  • Batch support

YAML is forgiving to write and unforgiving to debug, because a single mis-indented line can invalidate an entire file with a vague error. This converter shows the exact line and column of any problem as you type, alongside the JSON output. It runs entirely in your browser, so Docker Compose files, Kubernetes manifests and CI configuration — which routinely contain secrets — never leave your device.

100% client-side — your files never leave your device

Conversion runs locally in your browser using Canvas and WebAssembly. There is no upload step, no server processing and no file storage. Disconnect from the internet and this page still works.

Loading converter…

Step by step

How to convert YAML to JSON online

  1. Add your .yaml file

    Drag and drop your file into the box above, or click it to browse your device. Add several at once and they convert together as a batch.

  2. Choose your output settings

    Everything is configured automatically — the default settings produce an optimal .json for almost every use.

  3. Download the .json

    Click Download to save the result straight to your device. The whole process took a fraction of a second because nothing was uploaded or downloaded.

Side by side

YAML vs JSON

Here is how the two formats differ. Use it to decide whether converting is worth it, and which one to pick if you have a choice.

Comparison of YAML (YAML Ain’t Markup Language) and JSON (JavaScript Object Notation)
AttributeYAML.yamlJSON.json
Full nameYAML (YAML Ain’t Markup Language)JSON (JavaScript Object Notation)
CompressionText-basedText-based
TransparencyNoNo
Browser supportUniversalUniversal
File sizeTextText
Best forReadable config and CI pipelinesAPIs, configs and web apps

The guide

Getting the most out of YAML to JSON conversion

Reading YAML’s indentation rules

Indentation is the structure. A child must be indented more than its parent, and siblings must share exactly the same indentation. A sequence dash may sit at the same level as its key’s value or be indented further, and both are valid — which is the single most common source of confusion. Mixing tabs with spaces fails in ways that can be hard to spot visually, so configure your editor to insert spaces and keep the depth consistent.

Errors are reported with exact positions

When the parser rejects your YAML, this tool surfaces the line, column and the specific reason — an unclosed quote, a bad indentation level, a duplicate key, or a tab where a space was expected — rather than a generic "invalid YAML". That makes the fix obvious. Errors appear as you type, so you never have to convert, fail, and start guessing.

YAML features JSON cannot express

Dates, anchors, aliases, custom tags and multi-document streams have no JSON equivalent. Dates become ISO 8601 strings and anchors are resolved and expanded into plain nested objects, which is almost always what you want when feeding a JSON API. For multi-document YAML files separated by `---`, only the first document is converted; split the file if you need all of them.

Common questions

Frequently asked questions

Everything about how this converter handles your files, and how to get the best result.

What happens to dates and anchors in my YAML?
Dates are converted to ISO 8601 strings. Anchors and aliases are resolved and expanded into repeated plain objects, so the JSON output is fully self-contained with no external references.
How do I fix "bad indentation of a mapping entry"?
Every child key must be indented further than its parent, and siblings must match. The error message shows the exact line and column, so open the file at that position and compare the indentation with the surrounding lines. Never mix tabs and spaces.
Can it convert a multi-document YAML file?
Only the first document is returned, since JSON cannot represent multiple independent documents. Split the file on the --- separator and convert each part separately if you need them all.
Is it safe to paste a Kubernetes manifest?
Yes. Manifests routinely contain Secret objects with base64 credentials, so keeping them local matters. Parsing happens in your browser with no network request involved.