What it does
Paste JSON or YAML and the tool works out which one it is and converts it to the other as you type. You can also force the direction. Swap feeds the result back in, which is handy for checking that a round trip gives you the same data.
Features
- Errors you can act on: the line and column of the problem, the parser’s explanation (“bad indentation of a mapping entry”, “duplicated mapping key”, “Missing comma between properties”) and a snippet with a caret.
- YAML features handled: comments, anchors and aliases (
&defaults/*defaults), merge keys (<<: *defaults), block and folded strings, flow collections and multiple documents separated by---(returned as a JSON array). - Dates stay as written:
2024-11-05comes out as the string"2024-11-05", not a converted timestamp. - Safe YAML output: strings that YAML would otherwise read as booleans, numbers or dates (
"yes","on","0123","2024-01-01") are quoted, and long lines are never folded. - Warnings when a value cannot be represented exactly, such as integers larger than 253 or
.inf/.nan(JSON has no Infinity). - 2 or 4 space indent and optional key sorting.
How to use it
Paste or drop a .json, .yaml or .yml file, check the result, then copy or download it. Ctrl+Enter converts immediately.
Privacy
Conversion uses the open-source js-yaml library loaded into the page; your data is processed locally and never uploaded. The last input is remembered in your browser’s local storage.