No file open
Create a new file or open an existing one from the sidebar
Paste your JSON and press To YAML in the Convert panel.
No file open
Create a new file or open an existing one from the sidebar
To convert JSON to YAML, paste your JSON above, open Convert and press To YAML. The tab switches to YAML with the same data, nested objects become indented blocks and arrays become dash lists, and To JSON in the same panel converts it straight back.
Values that older YAML parsers would misread get quoted, so a country code like NO stays a string and a port mapping like 22:22 doesn't turn into a number. Look at the example below, those are real gotchas in Docker Compose files.
{
"services": {
"web": {
"image": "node:22-alpine",
"ports": [
"3000:3000",
"22:22"
],
"environment": {
"NODE_ENV": "production",
"COUNTRY": "NO"
},
"depends_on": [
"db"
]
},
"db": {
"image": "postgres:16",
"volumes": [
"db-data:/var/lib/postgresql/data"
]
}
},
"volumes": {
"db-data": {}
}
}services:
web:
image: node:22-alpine
ports:
- 3000:3000
- "22:22"
environment:
NODE_ENV: production
COUNTRY: "NO"
depends_on:
- db
db:
image: postgres:16
volumes:
- db-data:/var/lib/postgresql/data
volumes:
db-data: {}Yes. Older YAML parsers, including PyYAML and plenty of Go tools, read an unquoted no as false, which is the famous Norway problem. The converter quotes those values, along with dates and numbers that are stored as strings, so the YAML means the same thing whichever parser reads it.
Yes, YAML 1.2 is a superset of JSON, so any valid JSON is also valid YAML. Converting mostly swaps braces, brackets and quotes for indentation.
Yes, press To JSON in the YAML section of the Convert panel.
No, this runs entirely in your browser, so nothing you paste is sent to a server. The only feature that sends data anywhere is the optional AI assistant, and only when you actually ask it something.