Skip to content
My Tiny Utils

Search tools

Type to find a tool, then press Enter to open it.

YAML to JSON

Convert YAML to formatted JSON instantly, with clear error messages that point to the failing line. Runs locally in your browser.

Processed locally in your browser — nothing is uploaded.

YAML to JSON

0 characters

JSON

Output appears here…

About YAML to JSON

Convert YAML documents — configs, manifests, front matter — into JSON. Parse errors show the offending line so indentation mistakes are quick to find.

Common uses

  • Feed a YAML config to a tool that only accepts JSON
  • Inspect what a YAML file actually parses to (anchors, types, quoting)
  • Chain into JSON to TypeScript to type a YAML config

Example

Input

server:
  port: 8080

Output

{
  "server": {
    "port": 8080
  }
}

Limitations

  • Multi-document YAML streams convert to an array of documents
  • Custom YAML tags are not supported

Frequently asked questions

What happens to a YAML file with multiple documents?

Documents separated by --- are each parsed and the result is a JSON array with one element per document. A single-document file converts to that document's value directly.

Are YAML anchors and aliases converted?

Yes. Anchors (&name) and aliases (*name) are resolved during parsing, so the JSON output contains the referenced value expanded in place — JSON has no equivalent reference syntax.

Does my YAML file leave my browser?

No. Parsing and conversion run locally on your device, so manifests and configs containing secrets or internal hostnames are never transmitted or stored.

Why does my YAML fail with an indentation error?

YAML forbids tabs for indentation and requires consistent spacing to express nesting, so a single tab character or a misaligned key breaks the parse. The error message points to the offending line and column so you can fix the exact spot.