YAML to JSON Converter

Turn YAML into JSON and find syntax errors fast. Your file stays on your device.

  • Runs in your browser
  • No sign-up
  • No watermark

Paste YAML or choose a .yaml or .yml file and get JSON. Anchors and aliases are resolved, and a file with several documents separated by --- becomes a list. If the YAML is not valid, the tool points to the line and column and says what it found.

It uses the safe YAML subset, so custom tags that run code are not supported. The work happens in your browser and the file is not uploaded.

How to use YAML to JSON

  1. Paste your YAML, or choose or drop a .yaml or .yml file.
  2. Pick the JSON layout: 2 spaces, 4 spaces, tab or minified.
  3. Tick Sort keys if you want alphabetical order.
  4. Copy the JSON or download it.

Frequently asked questions

Is my YAML uploaded?

No. It is parsed in your browser and never leaves your device.

What if the file has several documents?

A YAML file can hold several documents separated by ---. They are returned as a JSON list, one item per document, and the tool tells you when this happens.

How are dates handled?

Values that YAML reads as timestamps, like 2024-05-31, are written in JSON as ISO date strings, for example 2024-05-31T00:00:00.000Z.

Are anchors and merge keys supported?

Yes. Anchors (&name), aliases (*name) and the merge key (<<) are resolved, so the JSON contains the full values.

Why does it say my YAML is invalid?

The message includes the line and column. The usual causes are tabs used for indentation, a missing space after a colon, or a list or quote that was not closed.

Are comments kept?

No. JSON cannot hold comments, so they are dropped.