DevKitBase
ToolsAboutPrivacy

YAML to JSON when the API won’t take your config as-is

Paste YAML, get JSON. Useful when you drafted in YAML and the next hop wants a JSON body.

chars: 46
Input
Output

When to use

CI snippets, converting Compose-like samples for a tool that insists on JSON, or normalizing mixed team configs.

Examples

Input
name: api
replicas: 2
Output
{
  "name": "api",
  "replicas": 2
}
Input
tags:
  - api
  - local
Output
{
  "tags": [
    "api",
    "local"
  ]
}

How it works

Parse YAML → JSON.stringify with optional pretty indent. Duplicate keys and YAML-only types may surprise you — check the result.

Common pitfalls

  • Bare yes/no may become true/false.
  • Tabs and messy indentation break parsers.
  • Anchors/aliases may not round-trip the way you expect.

How this differs

Opposite of JSON→YAML. YAML Formatter keeps YAML; this emits JSON.

FAQ

Do duplicate keys survive?
YAML parsers may keep the last; don’t rely on duplicates.
What about anchors and aliases?
Resolved into plain JSON objects when supported.
Tabs in YAML?
Prefer spaces; show a clear error if parse fails.
Reverse direction?
JSON to YAML.

Related tools

Runs in your browser. Nothing is uploaded. Not a security product —hashes and JWT decode are for debugging, not password storage or auth advice.