Data · free local utility

YAML to JSON & JSON to YAML Converter

Move a configuration or example payload between YAML 1.2 and JSON while keeping the source on your device.

Use the tool

Paste YAML or JSON, choose the direction, and copy the normalized result. Multiple YAML documents become a JSON array.

Worked example

See the input and expected result

Example input
service:
  name: api
  ports: [80, 443]
Expected result
{"service": {"name": "api", "ports": [80, 443]}}
How it works

Get a useful result in three steps

  1. Paste YAML 1.2 or valid JSON.
  2. Choose YAML to JSON or JSON to YAML.
  3. Review structural changes and verify the result in the destination parser.
Accuracy boundary

A focused tool, not an automatic expert

Conversion is not lossless: comments, anchors, aliases, custom tags, formatting, and some key representations cannot round-trip exactly.

Always verify the result in the system where you will use it. The page intentionally avoids accounts, uploads, and claims that go beyond the calculation it performs.

Questions

Before you use the result

Which YAML version is used?

The converter uses the YAML package's YAML 1.2 core behavior. YAML 1.1 booleans and custom application tags may behave differently.

What happens to multiple YAML documents?

Each document becomes one item in a JSON array. A single document becomes its JSON value directly.

Are comments and anchors preserved?

No. Conversion works on parsed values, so comments and source presentation are not guaranteed to survive.

Related tools

Continue the task locally

Browse every json & data tools in this workflow.