Back to home

YAML to JSON

Convert config files both ways, with line and column error reporting

YAML
0 chars0 bytes0 lines
JSON
The result shows up here

Parsed with js-yaml, so anchors, multi-line strings and comments all work. Parse errors report the exact line and column.

FAQ

Does YAML-to-JSON lose information?

Maps, lists and scalars convert cleanly, but comments are dropped and anchors/aliases are expanded to their values — JSON has no equivalent for them.

Can YAML be indented with tabs?

No. The YAML spec forbids tab indentation — use spaces, conventionally two per level. Check indentation first when parsing fails.