YAML to JSON Converter
Turn YAML into JSON for APIs, JavaScript code and tools that only read JSON. Errors are reported with the exact line and column.
Free · No sign-up · Files stay on your device
How to use YAML to JSON
- 1Paste your YAML.
- 2The JSON appears instantly as you type.
- 3Copy it or download the file.
Features
- Instant conversion as you type
- Errors with line and column numbers
- 2-space indentation
- Handles nested objects and arrays
- Runs locally in your browser
JSON vs. YAML
Both describe the same data. JSON uses braces, brackets and quotes and is ideal for machines and APIs. YAML uses indentation and is easier for people to read and edit, which is why it is popular for configuration. YAML is a superset of JSON, so any JSON is also valid YAML.
Common YAML mistakes
Tabs instead of spaces, inconsistent indentation, a missing space after a colon, and unquoted values like "yes", "no" or "on" (which YAML may read as booleans) cause most errors.
Frequently asked questions
Are comments kept?
JSON has no comments, so YAML comments are dropped when converting to JSON.
Does it support multiple YAML documents?
Files with several documents separated by --- are converted to a JSON array.
Is my data uploaded?
No. Conversion happens in your browser, so it is safe for secrets in config files.