JSON ↔ YAML Converter
Paste JSON and get clean YAML, or paste YAML and get JSON with consistent indentation. Built on js-yaml, so the parser handles anchors, multi-line scalars, and the usual YAML quirks correctly. Useful for moving between Kubernetes manifests, GitHub Actions workflows, Astro / Vite configs, and JSON-based tools.
How to use
- Pick the direction — JSON → YAML or YAML → JSON.
- Paste your input. The result updates as you type.
- Change the indent (2 or 4) for the output.
- Swap uses the output as the next input.
Frequently asked questions
- What YAML version is supported?
- YAML 1.2 via js-yaml. Anchors, flow style, multi-line scalars, booleans, and null are all handled.
- Does it preserve key order?
- Yes. JSON's natural object order is kept when emitting YAML, and YAML mapping order is kept when emitting JSON.
- What if the input is invalid?
- You'll see the parser error (line and column) in red. Fix the input and the output updates immediately.
- Does it handle comments?
- YAML comments are dropped because JSON has no equivalent. Going JSON → YAML produces a comment-free document.
Related tools
INI ↔ JSON Converter
Round-trip between INI-style config files and JSON — supports sections, dotted nesting, comments, and value type inference.
.env File Parser
Parse a .env / dotenv file with full support for single-quoted, double-quoted, multi-line, and inline-comment values. Export as JSON, YAML, shell exports, Dockerfile ENV, or Netlify TOML.
Markdown Table of Contents Generator
Generate a `[text](#anchor)` TOC from Markdown headings — bullet, numbered, or HTML output with GitHub/GitLab/simple slug styles.
TOML ↔ JSON Converter
Convert between TOML (`Cargo.toml`, `pyproject.toml`, Hugo configs) and JSON — handles tables, array-of-tables, inline tables, typed scalars.
XML ↔ JSON Converter
Convert XML to JSON and back, with full attribute support, configurable attribute prefix and text key. Browser-native DOMParser handles namespaces, CDATA, comments.
Fixed-Width Text Parser to CSV / JSON
Split fixed-width / fixed-column text into fields by column widths and export as CSV or JSON, in your browser.