# YAML ↔ JSON Convert & Compare

Convert YAML, JSON, JSONC, and JSON5 documents, or compare two files for logical equality with formatting controls.

Canonical: https://tools.karlquinsland.com/tools/html/yaml-json-convert-compare/
Published: 2026-01-30
Updated: 2026-04-25
Tags: html, yaml, json, jsonc, json5, convert, compare


---

# YAML ↔ JSON Convert & Compare

![Tool icon](https://tools.karlquinsland.com/tools/html/yaml-json-convert-compare/images/tool-icon.svg)

Convert YAML to JSON or JSON/JSONC/JSON5 to YAML, or compare two documents for logical equality. Includes formatting controls, copy/save actions, and shareable state.

[Open the tool](https://tools.karlquinsland.com/tools/html/yaml-json-convert-compare/tool.html)

## Notes

- YAML comments are ignored during conversion.
- JSONC/JSON5 comments are ignored during conversion.
- Formatted JSON output is strict JSON, even when the input used JSONC or JSON5 features.
- Multiple YAML documents in a single file are rejected.

## Dependencies


This tool relies on 2 dependencies.

| # | Library | Version | Via |
| ---: | --- | --- | --- |
| 1 | js-yaml | 4.1.0 | [cdn.jsdelivr.net](https://cdn.jsdelivr.net/npm/js-yaml@4.1.0/dist/js-yaml.min.js) |
| 2 | json5 | 2.2.3 | [cdn.jsdelivr.net](https://cdn.jsdelivr.net/npm/json5@2.2.3/dist/index.min.js) |

## Changelog



## `382c52f` - April 25, 2026 12:21

- Add JSON5 and JSONC converter input support


## `23eaecd` - January 29, 2026 20:29

- Align analytics and tools with dark mode


[View full changelog (3 commits)](https://tools.karlquinsland.com/tools/html/yaml-json-convert-compare/changelog/index.md)


