YAML to JSON converter

Kubernetes manifests, GitHub Actions, and docker-compose files are YAML; some APIs and JavaScript configs want JSON. Convert between formats locally — handy when lint tools accept only JSON or when embedding config in package.json scripts.

How to convert YAML to JSON

1. Paste YAML into the editor.
2. Run convert — syntax errors show line hints.
3. Review JSON output structure.
4. Copy JSON for API or validator.

Conversion examples

docker-compose snippet

services.web.environment map becomes nested JSON object for mock server.

GitHub Actions matrix

strategy.matrix YAML block becomes JSON for documentation generator.

OpenAPI YAML

Partial spec converted to JSON for Swagger UI paste test.

When YAML to JSON

• When tooling accepts JSON only (some schema validators).
• When JavaScript code needs parsed object from YAML source.
• When debugging YAML by viewing JSON equivalent structure.

Norway problem

Unquoted NO in YAML becomes false in some parsers. Quote country codes and version strings like "1.0" to avoid boolean/ float surprises in JSON.

Frequently asked questions

Comments in YAML?

Stripped on JSON output — comments do not survive conversion.

Tabs in YAML?

YAML forbids tabs for indentation — fix spaces first.

Multi-document YAML?

--- separated docs may need splitting manually.

Type coercion?

YAML 1.1 treats yes/no as boolean — JSON true/false results; beware unquoted country codes like NO for Norway.

Local?

Yes.