YAML ⇄ JSON CONVERTER
Convert YAML to JSON or JSON to YAML with live output and clear parse errors. Nothing leaves your browser.
In short
Convert YAML to JSON or JSON to YAML instantly, with clear error messages when parsing fails. Runs entirely in your browser, nothing is uploaded.
How to use the YAML ⇄ JSON converter
- 1
Choose YAML → JSON or JSON → YAML.
- 2
Type or paste your input into the left box.
- 3
Copy the converted result from the right box — it updates live as you type.
Questions
- Which YAML features are supported?
- This tool uses js-yaml, which supports the full YAML 1.1/1.2-style spec including anchors (&) and aliases (*), block and flow styles, multi-line strings, and standard scalar types (numbers, booleans, null, dates). It does not merge multiple '---' documents in a single file — only the first document in a multi-document YAML file is parsed.
- If I convert JSON to YAML, will comments be preserved?
- No. JSON has no concept of comments, so there's nothing to carry over — the YAML output will be clean, comment-free data. If you need to convert YAML with comments to JSON, the comments are simply dropped in the output since JSON can't represent them either.
- What indentation does the YAML output use?
- JSON → YAML output uses 2-space indentation with block style by default, and long lines are not wrapped, so nested arrays and objects stay readable without arbitrary line breaks.
- Is there a size limit on how large a file I can convert?
- There's no hard-coded limit — conversion happens in your browser's memory, so very large files (tens of megabytes) may feel slow or use a lot of RAM depending on your device, but typical config files and data exports convert instantly.
- Is my YAML or JSON data uploaded anywhere?
- No. All parsing and conversion happens locally in your browser using JavaScript — nothing you type or paste is sent to a server.
Related tools
- CSV ⇄ JSON ConverterConvert CSV to JSON or JSON back to CSV, with correct quoted-field and comma handling — entirely in your browser.
- XML to JSON ConverterConvert XML to JSON or JSON back to XML instantly. Attributes become @-prefixed keys, arrays are handled automatically — nothing uploaded.
- Unix Timestamp ConverterConvert Unix/epoch timestamps to human-readable dates in UTC and your local timezone, or a date back to a timestamp — client-side, no upload.
- YAML ValidatorValidate YAML syntax instantly and preview the parsed structure as formatted JSON. Clear error messages on failure — nothing uploaded.
- JSON Schema ValidatorValidate JSON data against a JSON Schema and see every failing property with its exact path and reason.
- ISO 8601 Date ConverterBuild or parse an ISO 8601 date/time, with week date, ordinal date, and Unix timestamp forms included.
- XML Formatter & MinifierPretty-print XML with correct indentation or strip whitespace to minify it. Catches syntax errors inline — nothing uploaded.
- JSON VisualizerExplore JSON as a tree, table, or mindmap.
Updated