sitekits.dev
press ⌘K to switch tools
FORMAT & CONVERT

JSON ↔ YAML Converter

Convert data between JSON and YAML formats.

local
json-yaml
§01 ABOUT THIS TOOL

Overview

JSON and YAML represent the same data model, but ecosystems disagree: Kubernetes, CI pipelines, and Ansible speak YAML, while APIs and JavaScript tooling speak JSON. This converter translates between the two instantly in either direction, powered by js-yaml running locally in your browser.

How to use

  1. Pick a direction with the JSON → YAML or YAML → JSON tab.
  2. Paste your input into the JSON (or YAML) field. The output field updates as you type.
  3. If the input cannot be parsed, the error message appears between the fields; otherwise copy the result.

Examples

  • {"name":"sitekits","tags":["a","b"]}
name: sitekits
tags:
  - a
  - b
  • The reverse direction turns that YAML back into pretty-printed JSON with 2-space indentation.

Notes

Converting YAML to JSON normalizes values: quoted and unquoted scalars both become plain JSON strings/numbers, and comments are dropped. JSON is (almost) a subset of YAML, so JSON → YAML → JSON round-trips cleanly for ordinary data.

FAQ
Is my data sent to a server?
No. Conversion runs entirely in your browser using the js-yaml library. Configuration files and payloads never leave your machine.
Is the conversion lossless?
For plain data (objects, arrays, strings, numbers, booleans, null) yes. YAML-only features such as comments, anchors, and custom tags have no JSON equivalent and are lost when converting to JSON.
What formatting does the output use?
YAML output uses two-space indentation with no line-width wrapping; JSON output is pretty-printed with two-space indentation.