quialo.

YAML to JSON Converter

JSON output

Everything runs in your browser. Nothing is uploaded. The YAML parser covers a common subset of YAML 1.2 (block and flow collections, quoted and typed scalars, literal and folded block scalars, and comments). It does not support anchors and aliases, merge keys, explicit type tags, or multiple documents.

Paste YAML to get JSON, or paste JSON to get YAML. The converter auto detects which way to go, infers types (numbers, booleans, and null), formats the output with your chosen indent, and shows a line numbered message when the input does not parse. Use the swap button to send the output back through the other way. Everything runs in your browser, so nothing is uploaded. The YAML side covers a common subset of YAML 1.2 (block and flow collections, quoted and typed scalars, literal and folded block scalars, and comments). It does not support anchors and aliases, merge keys, explicit type tags, or multiple documents in one input.

How to use

  1. Paste YAML or JSON into the input box.
  2. Leave the direction on Auto, or pick YAML to JSON or JSON to YAML.
  3. Choose the output indent: 2 spaces, 4 spaces, or a tab.
  4. Read the converted output on the right and copy it.
  5. Use Swap to feed the output back in and convert the other way.

Examples

  • YAML "port: 8080" becomes JSON { "port": 8080 } with the number inferred.
  • A quoted YAML value like zip: "01234" stays a string in JSON, not the number 1234.
  • Pretty printed JSON pasted on the YAML side parses fine, since JSON is valid YAML.

FAQs

Which way does it convert?
Both ways. On Auto it looks at your input: text that starts with a brace or bracket and parses as JSON is treated as JSON and converted to YAML, anything else is treated as YAML and converted to JSON. You can also force a direction with the toggle.
Which parts of YAML are supported?
A common, practical subset of YAML 1.2: block mappings and sequences, sequences of mappings, flow collections in square brackets and braces, plain and quoted scalars with type inference, literal and folded block scalars, and comments. It does not support anchors and aliases, merge keys, explicit type tags, or more than one document in a single input. Those raise a clear message rather than a wrong result.
How are data types handled?
Unquoted values that look like numbers, booleans, or null are converted to those JSON types. Quoted values stay strings, so a zip code like "01234" keeps its leading zero. When emitting YAML, the tool quotes any string that would otherwise be read back as a number, boolean, or null.
What happens when the input is invalid?
Nothing is converted and a message appears with the line number and the problem, for example an unclosed quote, a flow collection that is never closed, or tab characters used for indentation. Fix the line and the output updates as you type.
Is my data sent to a server?
No. Parsing and formatting happen entirely in your browser, so it is safe to paste private configuration. Nothing is uploaded or stored.

Related tools