YAML to JSON Converter

This YAML to JSON converter turns YAML config into clean, formatted JSON right in your browser — nothing you paste is uploaded anywhere.

Why convert YAML to JSON?

YAML is friendly for humans writing config files; JSON is what APIs, browsers and most programming tools actually speak. Converting between them is a daily task for developers moving Kubernetes, CI/CD, Docker Compose or application config into a JSON pipeline. This YAML to JSON converter handles the common cases — key-value pairs, nested objects, lists, lists of objects, numbers, booleans, nulls, quoted strings and simple inline flow collections — and formats the result with clean two-space indentation.

How to use this converter

  1. Paste your YAML into the top box (or edit the sample that is pre-loaded).
  2. The JSON appears in the output box as you type; click "Convert to JSON" any time to re-run it.
  3. If something is wrong, the error message names the line and the problem — usually a stray tab or uneven indentation.
  4. Copy the JSON with one click.

What is supported (and what is not)

Supported: nested maps, sequences, sequences of maps, scalars (strings, integers, floats, booleans, null), single- and double-quoted strings, comments, and one-line flow collections like [1, 2, 3]. Not supported: multi-line block strings (| and >), anchors and aliases (& / *), custom tags, and multi-document files. For those, use a full YAML library such as js-yaml or Python's PyYAML. And because the conversion runs entirely in your browser, your config — secrets and all — never leaves your machine.

Frequently asked questions

Is my YAML uploaded to a server?

No. This converter runs 100% in your browser using JavaScript. Nothing you paste is transmitted, stored or logged — you can verify by converting while offline after the page loads.

Why did I get an indentation error?

YAML structure is defined by indentation, so a line that is indented by an unexpected amount (or indented with tabs, which YAML forbids) cannot be placed in the tree. The error message gives the line number — check that it lines up exactly with its siblings.

Does it support lists of objects?

Yes. A sequence whose items start with a key (like '- name: app' followed by more keys at the same level) is converted into a JSON array of objects, which is the pattern most config files use.

What YAML features are not supported?

Multi-line block strings, anchors/aliases, custom tags and multi-document streams. Everyday configuration YAML — the kind in docker-compose, GitHub Actions and app settings — converts cleanly.

Related tools

Advertisement