JSON to YAML converter

Paste JSON or open a .json file and get clean YAML for Kubernetes, Docker Compose, GitHub Actions or Ansible. Strings that a YAML parser would read as something else (no, NO, 01234, 2026-03-14, 1_000) are quoted, so the data comes back identical. Nothing is uploaded.

Open a file: (or drop it on this box)

 

     

Why some strings get quotes

YAML guesses types from unquoted text, and parsers disagree. PyYAML and other YAML 1.1 readers turn no, NO, off, y and n into booleans (the "Norway problem": a country code NO becomes false), 2026-03-14 into a date, 1_000 into 1000, and 12:30 into 750 (base 60). This converter quotes every string that any of those rules would change. We checked it by converting a JSON file of 41 such strings and loading the YAML back with both js-yaml and PyYAML 6.0.3: both returned data identical to the input. Before we added the YAML 1.1 rules, PyYAML read "2026-03-14" back as a date and "1_000" as an integer.

Options

Pick 2 or 4 spaces of indentation, single or double quotes, and alphabetical key order. Long strings are never folded, and multi-line strings are written as | blocks. JSON numbers above 253 (9,007,199,254,740,992) lose precision when your browser reads the JSON, so keep long IDs as strings in the JSON.

Render the result as a PDF or an image

Need the data as a document? The Shotmint API turns HTML into a PDF or PNG in real Chromium: POST https://shotmint.creasework.com/v1/pdf with {"html": "…"} returns a PDF, and /v1/screenshot returns a PNG of any page or HTML (1 credit each; 25 free renders a month, then €5 for 2,000 that never expire). Scripts, AI agents and Make or Zapier can get a key with a bare POST https://shotmint.creasework.com/v1/keys/free (no body, JSON reply); the request bodies are described in openapi.json.

Get 25 free renders a month API docs

FAQ

Is my file uploaded? No. Parsing and conversion run in your browser with js-yaml and fast-xml-parser; this page sends nothing to a server, so it works for secrets in config files.

Can it convert the other way? Yes: every page reads JSON, YAML and XML (detected automatically), and the "Convert to" menu picks the output, so it also converts XML to YAML or reformats a file in its own format. Related: YAML to JSON, XML to JSON, JSON to XML, CSV to JSON, JSON to CSV, JSON to Excel.

Related tools

YAML to JSON · JSON formatter · XML to JSON · JSON to XML · CSV to JSON · JSON to CSV · Excel to JSON Converter · JSON Diff · JSON to Excel Converter · JSON Validator · Minify JSON · all free tools