JSON → YAML Converter

Paste JSON, get clean YAML. Private by design—everything runs locally in your browser.

JSON Input

0 chars

YAML Output

Tip: Press Ctrl/Cmd + Enter to convert. You can also drop a .json file into the input box.

About this tool

This converter parses your JSON entirely in your browser with the built-in JSON parser, then outputs equivalent YAML using a local JavaScript library. No files or data ever leave your device—ideal for sensitive configs.

Tips

  • Use Indent to control YAML indentation width.
  • Sort keys produces stable YAML for cleaner diffs.
  • Remove nulls strips properties with null values from objects before conversion.
  • Inline (flow) style uses compact one-line collections where possible.

Common JSON gotchas

  • JSON requires double-quoted keys/strings and no trailing commas.
  • Numbers are IEEE-754 doubles—very large integers may lose precision.
  • undefined, functions, and comments aren’t valid JSON.

Privacy

100% client-side. This page performs all parsing locally with no network requests (aside from the initial page load).

5 Fun Facts about JSON ⇄ YAML

JSON is valid YAML

YAML 1.2 treats plain JSON as valid YAML, so your input is already “YAML enough”—conversion mainly prettifies spacing.

Spec overlap

Flow mode is JSON in disguise

YAML’s flow style ({}/[]) is basically JSON syntax, handy when you want compact single-line snippets.

Inline twin

Comments unlocked

JSON bans comments, but once converted you can sprinkle # notes into the YAML to explain fields without breaking the data.

Docs inside

Cloud tools speak both

AWS CloudFormation, GitHub Actions, and Kubernetes all accept JSON, but YAML stays friendlier to read and diff—hence the conversion.

Infra trivia

Bundle multiple docs

YAML can stack several documents in one file using --- separators, so you can tack on extra configs after converting.

Batch-friendly

Explore more tools