Validate precisely
Find malformed mappings, arrays, strings, and indentation with a clear line and column whenever the parser can identify them.
YAML / JSON
Format, validate, and convert YAML or JSON without leaving your browser. Your source stays local, from first paste to final copy.
Paste YAML or JSON, then format it or press Ctrl/⌘ + Enter.
Find malformed mappings, arrays, strings, and indentation with a clear line and column whenever the parser can identify them.
Turn YAML into JSON or JSON into YAML while keeping nested objects, arrays, booleans, numbers, and null values intact.
Parsing and formatting happen locally. Nothing is uploaded, stored, or added to a URL.
Load either example into the editor to validate it, change the indentation, sort its keys, or convert it to the other format.
service:
name: catalog-api
enabled: true
ports:
- 8080
- 8443
environment:
LOG_LEVEL: info
{
"service": {
"name": "catalog-api",
"enabled": true,
"ports": [8080, 8443],
"environment": {
"LOG_LEVEL": "info"
}
}
}
Most syntax failures come from a small set of punctuation and indentation mistakes. The validator points to the closest known line and column so you can correct them quickly.
YAML uses indentation to define structure. Do not mix tabs and spaces, and keep values at the same level aligned. The editor’s Tab key inserts spaces automatically.
Quote strings containing a colon followed by a space or a hash preceded by a space. Otherwise YAML may interpret the value as a mapping or comment.
JSON requires double-quoted property names and strings. Separate items with commas, but do not leave a trailing comma before a closing brace or bracket.
Objects use braces and arrays use brackets. A missing or extra closing character can make the remainder of an otherwise valid document fail to parse.
Place --- on its own line between YAML documents.
When converted to JSON, a multi-document stream becomes a JSON
array containing each document.
Validation and conversion happen in this browser. Native Cube does not upload, log, or retain the YAML and JSON you paste.