HTML Formatter
Beautify and indent HTML markup.
OpenPaste YAML and get the equivalent JSON, with anchors, aliases and multi-line strings resolved.
Add a config file, OpenAPI spec or Compose file.
The parser library is fetched once from a CDN.
Types, anchors and block strings are resolved as you type.
Copy the JSON or download it.
Your service reads JSON but the configuration is maintained in YAML, or you want to see exactly what a YAML file resolves to before some parser surprises you. Converting it shows every type and every expanded alias plainly.
The converter parses your YAML with js-yaml and prints the result as JSON with two-space indentation. Anchors and aliases are expanded into full copies, merge keys are applied, block scalars (| and >) become single strings with their newlines, and types are resolved by the YAML rules, so 8080 becomes a number, true a boolean, and quoted values stay strings. Output updates live and can be copied or downloaded as out.json. Parse errors appear under the panels with the line and column.
This is the fastest way to answer the question of what type a value really is. A version string like 1.10 without quotes becomes the number 1.1, a classic source of bugs that the JSON output makes obvious. Comments are dropped, since JSON has no place for them. Explore large results when you browse it as a tree, create a contract with the schema generator for JSON, or turn JSON back into YAML.
The js-yaml library is downloaded from jsDelivr the first time you convert; the YAML itself is parsed in this tab and is not uploaded.
Keyboard shortcut
Answers for this tool. For site-wide help, open the FAQ hub.
Unquoted dates such as 2024-05-01 are read as YAML timestamps and become JavaScript dates, which JSON prints in full ISO form like 2024-05-01T00:00:00.000Z. Quote the value in the YAML to keep it as a plain string.
Yes. js-yaml applies merge keys, so the JSON shows the final merged map with the anchored values copied in and any local overrides applied.
Not in one go. The parser expects a single document, so split the file at each --- and convert the parts one at a time.