Daldal Tools

YAML ⇄ JSON Converter

Convert YAML to JSON and JSON to YAML in your browser. Auto-detects the input, handles multi-document YAML, and reports syntax errors with the line number.

Runs in your browser

YAML

JSON

How to use

Paste YAML or JSON on the left and the other format appears on the right. In automatic mode the tool tries to read the input as JSON first and falls back to YAML, which works because every JSON document is also valid YAML. Pin the direction with the toggle if you are pasting YAML that happens to look like JSON.

YAML is read with the YAML 1.2 core schema, so bare words like yes, no, on and off stay strings instead of turning into booleans, and octal-looking values such as 0o17 become numbers only when written the 1.2 way. Duplicate keys are rejected rather than silently overwritten. A file with several documents separated by --- becomes a JSON array with one element per document.

When converting JSON to YAML, choose the indentation and whether nested arrays and objects are written one item per line (block style) or inline as [1, 2, 3] (flow style). Strings that a YAML 1.1 parser would misread, such as "yes" or "1", are quoted automatically so the output round-trips in older tools.

Syntax errors show a short headline plus the message from the parser and the line where it gave up. Nothing you paste leaves your browser, so configuration files with credentials or internal hostnames are safe to convert here.

Tools people use next