YAML to JSON Converter
Validate YAML, normalize indentation, sort keys, and convert YAML to JSON locally in your browser.
Related
Guides for YAML Fix
JSON Interop: YAML, CSV, XML, JWT, Schema
JSON rarely lives alone. Convert between JSON and YAML/CSV/XML, decode JWTs, generate types, and validate against JSON Schema — every step staying in the browser.
Convert YAML to JSON (and Avoid Indentation Errors)
Since YAML 1.2 every JSON document is valid YAML. Convert YAML config to JSON, and watch for indentation and type-inference traps.
Validate JSON Before API Requests
A quick validation pass before sending an API request can separate JSON syntax problems from authentication, schema, and backend errors.
YAML Validator & Formatter
Paste your YAML to instantly check for syntax errors. The validator highlights the exact line where the problem occurs. You can also reformat YAML with consistent indentation or convert it to JSON in one click.
The same tool works as a yaml lint / yaml linter /** yamllint** / yaml checker /** online yaml validator** — paste any YAML and it reports the first parse failure with line and column. Use it to validate yaml online: format, lint, and convert all run locally with no upload.
YAML vs JSON: both are data-interchange formats and YAML 1.2 is a strict superset of JSON, so any JSON document is already valid YAML. The practical difference is shape — YAML uses indentation and is comment-friendly (good for human-edited config), JSON uses brackets and is strict (good for APIs). Use To JSON when you need to feed config to a tool that only accepts JSON.
- Validate — strict YAML 1.2 parsing with exact line/column error reporting
- Format YAML — normalises indentation (2 spaces) and key ordering
- Convert to JSON — outputs valid, pretty-printed JSON ready to use in APIs
Common YAML errors
Tabs instead of spaces
YAML forbids tab characters for indentation. Replace all tabs with spaces.
Inconsistent indentation
Child keys must be indented by the same number of spaces relative to their parent.
Unquoted special characters
Values that start with :, -, or # may need to be wrapped in quotes.
FAQ
Why does my YAML fail to parse?
Almost always indentation: a tab character (YAML forbids tabs for indentation) or sibling keys at inconsistent depths. The formatter rewrites everything to a single space-based width, which surfaces and fixes most of these.