/ developer & network toolbox
← all tools

$ yaml

runs locally

JSON ↔ YAML

Convert between JSON and YAML, both directions, in your browser.

yaml — invoker.tools

Converts in your browser — nothing is uploaded.

About the JSON ↔ YAML

This converter translates data between JSON and YAML in both directions. JSON is the lingua franca of APIs while YAML is the format of choice for configuration files (Kubernetes, CI pipelines, Docker Compose), so moving between them is a frequent task. Paste JSON to get YAML, or paste YAML to get formatted JSON.

The conversion is structural — objects, arrays, strings, numbers, booleans and null all map across cleanly — and validation errors are reported with a clear message so you can spot the offending line. Everything runs locally in your browser; your configuration never leaves the page.

How to use it

  1. Choose the direction: JSON → YAML or YAML → JSON.
  2. Paste your source into the box.
  3. Run the conversion and read the result.
  4. Copy the output with one click.

Examples

  • Convert an API's JSON response into readable YAML.
  • Turn a YAML config block into JSON for a tool that expects it.
  • Reformat and validate a YAML file by round-tripping it through JSON.

Frequently asked questions

Is the conversion lossless?

For standard data types (objects, arrays, strings, numbers, booleans, null) the conversion is faithful in both directions. YAML-specific features like comments and anchors are not preserved when converting to JSON, which has no equivalent.

Why do I get a parse error?

The input is not valid JSON or YAML. The error message names the problem (for example a syntax error or wrong indentation) so you can fix the offending line.

Does YAML support comments?

Yes, YAML allows # comments, but JSON does not, so comments are dropped when converting YAML to JSON.

Is my data uploaded?

No. The conversion uses a YAML library that runs entirely in your browser.

More convert tools