What this tool does
Turn JSON configuration into YAML: when API responses need to become a K8s manifest, a GitHub Actions workflow or a docker-compose file, hand-writing the indentation is where mistakes happen — paste it here instead. Indent width is configurable and long strings stay on one line.
It pairs with the YAML to JSON tool on this site: both directions share the same parser, so a round trip does not silently change meaning. Everything runs in the browser and your config never leaves the device.
How to use
- Step 1: paste JSON Paste the whole JSON document. A syntax error (a missing comma, an extra brace) is reported with the line and column, so you never receive a silently wrong YAML.
- Step 2: set indent and sorting The indent defaults to 2 spaces (the K8s and GitHub Actions convention) and can be 4, 6 or 8. Turning on key sorting outputs every object alphabetically, which makes diffing two configs far easier.
- Step 3: copy the result The result recalculates as options change. Long strings — URLs, keys, regexes — are never folded, so what you copy works as-is.
Limits
Format conversion only: no JSON Schema validation, and no comment preservation — JSON has no comments, so the YAML will not either; add them after converting. Integers beyond 2^53−1 lose precision. A single file is capped at 10MB with a clear error beyond that.
FAQ
Why are long strings not folded?
Deliberate. Folded scalars (>-) are semantically equivalent but re-introduce newlines when copied, which breaks URLs and keys. The line width is set to "never fold".
Does the key order change?
By default the JSON order is preserved. Sorting only happens with the key-sorting option on, which exists to make config diffs readable.
Does it round-trip back to the same JSON?
Semantically yes: converting back with the YAML to JSON tool preserves structure and values. Key order changes if sorting was on, and number formatting may be normalised (1.0 vs 1) — same meaning, not byte-identical.
Are comments preserved?
JSON has no comment syntax, so there is nothing to carry over; add comments to the YAML after converting.
Does it accept JSON5 or trailing commas?
No — parsing is strict JSON, so trailing commas, single quotes and unquoted keys are rejected with a position. Normalise the file with the JSON formatter first, then convert.
Is my config uploaded?
No. Conversion happens in the page and no request carries your config, so keys and internal addresses never leave the device.