YAML to JSON Converter
Turn YAML into JSON, with clear errors that point to the line that is wrong.
Processed on your device. Files are not uploaded
How to convert YAML to JSON
Paste your YAML
Paste or type it into the box, or press Try an example.
Pick the layout
Choose 2 spaces, 4 spaces, a tab, or minified output.
Copy or download
Use the JSON in an API call or a config that does not accept YAML.
Worked example
This is what YAML to JSON Converter gives for its own sample values. Open the tool above and change anything to try your own.
YAML
name: sarva-tools version: 1.2.0 private: true author: name: Ada email: ada@example.com keywords: - tools - developer scripts: build: next build test: vitest run
- Indentation
- 2 spaces
JSON
{
"name": "sarva-tools",
"version": "1.2.0",
"private": true,
"author": {
"name": "Ada",
"email": "ada@example.com"
},
"keywords": [
"tools",
"developer"
],
"scripts": {
"build": "next build",
...About YAML to JSON Converter
Turn YAML into JSON so you can use it in code, an API call or a tool that only reads JSON. If the YAML has a mistake, the message points to the line.
FAQs
Are all YAML features supported?
Block maps, lists, scalars, quoted strings and comments are. Advanced features such as anchors and custom tags may not be.
Can I check YAML without converting it?
Use YAML Validator.
What happens to comments?
JSON has no comments, so they are dropped.