YAML to JSON Converter

Convert YAML config to JSON online: nested maps, sequences, block scalars and common scalar types are handled; syntax errors report the line. Nothing is uploaded.

Files stay local .yaml、.yml Max 10MB
Files stay local
or drag a file in (up to 10MB each)

Options

What this tool does

YAML to JSON turns CI, Kubernetes or application config into the JSON that programs prefer: nested maps, sequences, block scalars and common scalar types convert faithfully, and syntax errors come back with a concrete reason.

Optional recursive key sorting makes diffs and comparisons painless. Everything runs in your browser; the config is never uploaded.

How to use

  1. Paste YAML or drop a .yaml / .yml file Up to 10MB, UTF-8; single-document YAML only.
  2. Toggle key sorting if needed Sorting applies at every level; output is stabler and diff-friendly.
  3. Copy or download the JSON Two-space indent by default; turn pretty off for single-line output.

FAQ

Will numbers and strings get confused?

No. Bare values follow YAML typing; quoted values stay strings.

Are multi-document files (repeated ---) supported?

No. Split into single documents first; the tool tells you explicitly.

Do errors include the line number?

Usually. The parser reason, line included, is surfaced in the message.

Is my file uploaded?

No. Parsing and serialization happen entirely in your browser.

Are comments kept?

No. JSON has no comment syntax; output is data only.

Can it convert JSON back to YAML?

This tool is YAML→JSON only; the reverse direction is a planned separate tool.

Limits

Up to 10MB per file; UTF-8 and single-document YAML only.

Comments are dropped; custom tags (e.g. !!python/object) are unsupported and error out.

No JSON→YAML reverse conversion.

Related tools