>>
PERMARKET
ToolsDeveloperYAML to JSON Converter
YJ

YAML to JSON Converter

Parse a YAML subset into JSON.

JSON appears here…
Ad · Large Rectangle (336×280)

How to use YAML to JSON Converter

Convert a common YAML subset (maps, lists, scalars) into JSON you can paste into code.

  1. Open YAML to JSON Converter on toolpermarket and enter your values in the fields below.

  2. In the YAML field, paste the YAML subset (maps, lists, scalars) to parse. Indent with spaces, not tabs — YAML depends on indentation.

  3. Press Convert to compute the result. The output appears immediately below the form. You can change any input and run it again to compare results.

  4. Read the result and use it as needed. If the number looks off, re-check your inputs and run it again — the math is deterministic, so the same entries always return the same answer.

Worked example. Paste name: Jane\nage: 30\ntags:\n - a\n - b and get back {"name":"Jane","age":30,"tags":["a","b"]}.

Tips for accurate results.

  • This converter covers the common subset: nested maps, lists of scalars, and plain values.

  • Numbers, true, false and null are recognised automatically; everything else is treated as a string.

  • A dash on its own line starts a list, and a "key:" with nothing after it starts a nested block.

When to use YAML to JSON Converter. Turning a hand-written YAML config into JSON for an API. Sanity-checking that a YAML file parses the way you expect. Feeding YAML from docs into a JSON-based pipeline.

When you actually reach for this

  • You have a YAML config (CI, compose, k8s) and need JSON for a tool or API that only accepts JSON.
  • You want to validate that your YAML parses correctly before deploying it.

Where this tool stops being accurate

  • YAML's significant whitespace means a single mis-indented line changes the whole structure; the converter will reflect that, not fix it.
  • Anchors and aliases resolve during conversion, so the JSON expands them and loses the reference relationship.

Frequently asked questions

Which YAML features are supported?

A practical subset: maps with string or numeric keys, lists of scalars or inline maps, and scalar values that are strings, numbers, booleans or null. Anchors, multiline blocks and flow style are not supported.

Why did my value become a quoted string?

Values that look like numbers, true/false or null are parsed as those types; everything else — including values with special characters — is kept as a plain string, quoted when required for safety.

What if a line is mis-indented?

Because indentation defines structure, a wrong indent can change where a key belongs. The tool reports a parse error rather than silently producing the wrong object, so fix the indent and try again.

Conversion failed with a strange indent error — what now?

YAML forbids tabs and is strict about indentation; replace tabs with spaces and align siblings. The error line points to the mis-indented block.

My *anchor values doubled in size — is that normal?

Yes: YAML anchors are expanded inline into JSON, so shared blocks are duplicated rather than referenced. That is expected.