YAML JSON Bridge
Convert YAML to JSON and back, with warnings for ambiguous implicit-typing words. Your data never leaves your browser.
Input
Output
What is YAML JSON Bridge?
YAML and JSON are both ways to write structured data, but YAML uses indentation and looks closer to plain text (common in config files like Kubernetes manifests or CI pipelines), while JSON uses braces and brackets (common in APIs). YAML JSON Bridge converts a file from one to the other, and flags spots where YAML's "implicit typing" could silently turn a word like yes or no into a boolean instead of a string.
How to use YAML JSON Bridge
- Choose a direction: YAML → JSON or JSON → YAML.
- Paste your content into the Input panel (or click Example to load a sample).
- The Output panel converts it instantly, with any implicit-typing warnings shown below it.
- Use Copy or Download to grab the result, or Clear to start over.
How YAML/JSON conversion works
YAML 1.2 and JSON share the same underlying data model (mappings, sequences, scalars), so converting between them is mostly a matter of re-serializing the same parsed value. This tool uses a locally-bundled copy of js-yaml (no CDN, no server call) to parse and generate YAML, following YAML 1.2's core schema — the same schema used by modern parsers like Kubernetes' own YAML handling:
// YAML in
name: my-app
replicas: 3
tags: [web, api]
// JSON out
{
"name": "my-app",
"replicas": 3,
"tags": ["web", "api"]
}
The one place this trips people up: under the older YAML 1.1 rules that some tools (older PyYAML, Ansible, some spreadsheet-to-YAML exporters) still follow, bare unquoted words like yes, no, on, off, y and n are read as booleans — the textbook case being Norway's ISO country code NO silently becoming the boolean false in a spreadsheet exported to YAML. This tool follows the stricter YAML 1.2 core schema and keeps those words as strings, but still flags every occurrence so you know a downstream YAML-1.1 tool might read your file differently — quote them ("no") if you mean the string.
Frequently asked questions
Is it safe to paste a Kubernetes manifest or secret here?
Yes. All parsing happens in your browser using a locally-bundled copy of the js-yaml library; nothing is ever sent to a server.
Why does the tool warn me about words like 'no' or 'yes'?
Under the older YAML 1.1 rules that many real-world parsers still use, bare words like yes, no, on, off, y and n are read as booleans instead of strings — famously turning Norway's country code "NO" into false in a well-known spreadsheet-to-YAML bug. This tool follows the stricter YAML 1.2 core schema and keeps them as strings, but still flags them so you know a different tool downstream might disagree.
Does it support multiple YAML documents in one file (--- separators)?
No, this tool handles a single YAML document at a time, which covers the vast majority of Kubernetes and Docker Compose files.
Does converting JSON back to YAML preserve quoted strings correctly?
Yes. A JSON string value keeps its string type in the generated YAML, even if it looks like a number or boolean word — the tool quotes it when needed so it round-trips correctly.