DevToolsLab

Convert YAML to JSON

Browser-only · Instant · Free

Paste YAML on the left, get pretty JSON on the right.

Swap directionAll conversion runs in your browser. Nothing is uploaded.
Input · YAMLValid
Output · JSON

All conversion runs in your browser. Nothing is uploaded.

About this converter

Most APIs and storage layers ultimately need JSON. This converter takes a YAML document of any complexity — including anchors, aliases and multi-document streams — and emits cleanly indented JSON that you can paste straight into your code. Everything runs locally in your browser.

Features

  • Full YAML 1.2 parser (js-yaml) with anchor / alias support
  • Pretty-printed JSON output with 2-space indentation
  • Reports the exact YAML line and column on syntax errors
  • Handles multi-line strings and block scalars correctly
  • 100% browser-based — no upload

How to use

  1. Paste your YAML into the left panel.
  2. Read the pretty-printed JSON on the right — updated as you type.
  3. Click Copy or Download to export the result.

Frequently Asked Questions

Are YAML anchors and aliases (& and *) resolved?

Yes. js-yaml resolves anchors and aliases at parse time, so the resulting JSON contains the expanded values — JSON has no concept of references.

Why do my dates become strings?

YAML has a `timestamp` type but JSON does not, so dates are emitted as ISO 8601 strings, which is the conventional way to represent dates in JSON.

What about multi-document YAML (--- separators)?

Only the first document is converted by default. If you need to handle multi-document streams, paste each document separately or wrap them as an array in YAML first.

Related tools

Convert YAML to JSON Online — Free YAML to JSON Converter

Canonical: https://devformatlab.com/en/convert/yaml-to-json