From one unambiguous format to the readable one.
Conversion runs through js-yaml with two-space indentation, line wrapping disabled and references turned off, so nothing is collapsed into an anchor you have to resolve by hand. If the library is unavailable, the built-in writer emits the same block structure locally.
| JSON | YAML |
|---|---|
{ "tags": ["a", "b"] } | tags: followed by - a and - b |
{ "active": true } | active: true |
{ "version": "1.0" } | version: '1.0' — quoted, so it stays a string |
{ "empty": {} } | empty: {} |
What YAML cannot carry
- ▸One number type becomes two. JSON has a single number; YAML separates integer from float, so
1and1.0are different scalars on the way back. - ▸There is no null keyword conflict to worry about:
nullis written asnull, and both~andnullread back as null. - ▸Words that mean booleans in YAML 1.1 —
yes,no,on,off— are quoted on output, precisely so an older parser does not turn the string intotrue.
NOTE Tabs are not indentation in YAML. Paste the output into an editor that swaps leading spaces for tabs and the document stops parsing.
What you get on this page
- ▸Powered by js-yaml
- ▸Nested objects and arrays supported
- ▸Copy or download the YAML result
- ▸No server-side conversion
Because bracekit is a static application, this page loads quickly, caches well and never sends your data to a parsing server. Your formatting preferences, recent documents and snippets stay in local storage.