Skip to content
Private: files never leave your device

YAML to JSON Converter

YAML to JSON conversion in one click, and back from JSON to YAML, with errors reported by line and column. Ideal for Docker Compose, Kubernetes, GitHub Actions and OpenAPI files.

YAML to JSON Converter tool

YAML to JSON and JSON to YAML, with errors shown by line and column.

Handled on your device, so your files stay private.

YAML to JSON Converter at a glance

Switch YAML to JSON or JSON to YAML instantly, with line-numbered errors, multiple documents, anchors and comments supported. Free and private in your browser.

Cost
Free to use, with no account, watermark or usage cap.
Privacy
Processing happens on your device; nothing is sent to our servers.
Devices
Up-to-date Chrome, Edge, Firefox or Safari on computers, Android phones and iPhones.
Last updated

Converting YAML to JSON, step by step

  1. Pick YAML → JSON or JSON → YAML.
  2. Paste your text or drop in a .yaml, .yml or .json file. Click Load sample to try it.
  3. The converted output appears instantly, with any errors shown at their position.
  4. Copy or save the result, or click Swap to convert it the other way.

Complete YAML support

Conversion uses the yaml library, which follows the YAML 1.2 standard: nested maps and lists, multi-line strings, anchors and aliases (& and *), comments and multiple documents split by ---, which become a JSON array. Choose 2 or 4 spaces of indentation and, if you like, sort keys alphabetically.

When to use YAML and when JSON

YAML is friendlier for people to read and edit, which is why config files use it. JSON is stricter and is what most APIs and programming languages pass around. Converting between the two comes up when moving settings between tools, writing API tests or debugging a Kubernetes manifest.

Your configs stay private

Config files often hold passwords, API keys and server addresses. Conversion happens entirely in your browser, so nothing is uploaded.

Frequently asked questions

Do YAML comments carry over to JSON?

No. JSON does not support comments, so they are dropped when converting to JSON.

What about several YAML documents in one file?

Documents separated by --- turn into a JSON array with one entry per document.

Why am I getting an indentation error?

YAML relies on spaces for structure and does not allow tabs for indentation. Look at the line in the error and make sure child items are indented consistently.

Is JSON also valid YAML?

Yes. YAML 1.2 is a superset of JSON, so any JSON document is valid YAML.

Does my text get uploaded?

No. Everything happens in your browser on your own device. Your text is never sent, logged or saved.