Skip to content

File Tools

JSON to YAML Converter

Move configuration data between JSON and a practical YAML subset without uploading content.

What Does Not Survive the Round Trip

JSON and YAML cover overlapping but not identical data models. YAML strings do not require quotes — until they look like numbers, booleans or dates, which is why the infamous Norwegian customer with country code "NO" became boolean false in some YAML parsers: unquoted two-letter values get interpreted. Comments exist in YAML but not JSON, so they vanish in that direction; anchors and multi-line scalars have no JSON equivalent at all. Round-tripping a config through this converter is a check, not a guarantee — validate the result parses as the same structure.

Where JSON and YAML Differ in Practice

JSON is strict: double-quoted keys, no comments, no trailing commas. YAML trades that strictness for readability and uses indentation to show structure, which means a misplaced space changes the meaning. Tabs are not allowed for indentation in YAML.

The classic YAML trap is implicit typing: an unquoted value such as no, on, 1.10 or 0123 may be read as a boolean or number rather than a string. When converting, check anything that should stay text and quote it. Comments in YAML are lost when converting to JSON, since JSON has no way to hold them.

How the Tool Processes Your File

  1. Paste JSON or YAML data and choose the conversion direction, or let the tool auto-detect it.
  2. Objects, arrays, strings, numbers, and booleans are mapped between the two formats recursively.
  3. Inline flow arrays and objects in YAML are expanded into block style for readability, and back to flow style when converting to JSON.
  4. Copy the output or download it as a file for your configuration.

Typical Use

JSON config to YAML
Input: {"server":{"port":8080,"tls":true},"workers":4}
Output: server: port: 8080 tls: true workers: 4
YAML is the preferred format for most CI/CD and container configuration. Converting JSON to YAML produces the equivalent file without hand transcription.
YAML to JSON for scripting
Input: api: url: https://x.com retries: 3
Output: {"api":{"url":"https://x.com","retries":3}}
Many scripts consume JSON natively. Converting an existing YAML config avoids rewriting by hand.

Common Questions

Does it support YAML anchors and aliases?

No. The converter targets the practical JSON-compatible subset of YAML. Anchors, aliases, and custom tags are not supported and will be rejected with a clear message.

Can I convert files or only pasted text?

Both. You can paste text, and the output can be downloaded as a .json or .yaml file for direct use in your project.

Are comments preserved?

JSON has no comments. When converting YAML to JSON, comments are intentionally discarded since they have no JSON representation.