Skip to main content

JSON to YAML Converter

Runs locally

Convert JSON to YAML and back with indent, flow style, key sorting and lossy warnings.

What is JSON to YAML Converter?

Convert JSON to clean YAML or transform YAML configs back into JSON. Configure indentation, line width, quoting style, key sorting, and multi-document output without uploading sensitive configs.

How to use JSON to YAML Converter

  1. Step 1

    Paste JSON (or YAML when converting in reverse) into the input editor.

  2. Step 2

    Pick conversion direction and YAML formatting options in the Options drawer.

  3. Step 3

    Check any lossy-conversion warnings if converting comments or anchors.

  4. Step 4

    Copy or download the resulting .yaml or .json file.

Features

  • Bidirectional JSON ↔ YAML, plus TOML, XML, CSV, INI, .env, and plist support
  • Preserves key order by default with optional alphabetical sorting
  • Configurable indent (2 or 4 spaces), flow level, and string quoting
  • Multi-document YAML support (--- separators)
  • Syntax diagnostics with line and column numbers
  • One-click Swap to reverse conversion direction

Example

Input

{"service":"web","replicas":3,"env":{"PORT":3000}}

Output

service: web
replicas: 3
env:
  PORT: 3000

Maps nested JSON objects into indented YAML blocks.

Frequently asked questions

Does JSON to YAML keep key order?

Yes, object key order is preserved unless you enable key sorting in Options.

Can I convert multi-document YAML back to JSON?

Yes. Multi-document YAML streams are converted into a JSON array of documents.

Are my Kubernetes or CI secrets uploaded?

No. Conversion runs entirely inside your browser.

What happens to YAML comments when converting to JSON?

JSON does not support comments, so converting YAML to JSON drops comments and surfaces a lossy-conversion note.