Nested object and array
Convert project metadata, flags, and a list of owners.
{ "project": { "owners": ["Ada", "Lin"] } }
project:
owners:
- Ada
- Lin
No file selected.
Browser-side file limit: 2 MB. Automatic conversion pauses above 500 KB.
Spaces per nesting level (2–8).
Flow style renders every array and object inline with [] and {}.
Long foldable YAML strings may wrap at this width.
Used when a YAML string needs or is forced to use quotes.
Use Tab to indent and Ctrl/Cmd + Enter to convert. Matching brackets are highlighted at the caret.
.json file up to 2 MB, or drop a file into the JSON input editor.converted.yaml.The direction switch supports an explicit YAML-to-JSON workflow without guessing the input format; use Swap input and output to reverse both the formats and current contents.
Parsing and output generation happen in your browser. Document contents are not submitted for conversion. The converter uses js-yaml 4.1.0, served from a same-origin local site asset rather than fetched from a third-party origin. Last tested and updated: .
Select an example to load both formats. In the default direction it loads JSON input and YAML output; in reverse it loads YAML input and JSON output.
Convert project metadata, flags, and a list of owners.
{ "project": { "owners": ["Ada", "Lin"] } }
project:
owners:
- Ada
- LinTurn deployment image and service settings into values YAML.
{ "replicaCount": 3, "image": { "repository": "nginx" } }
replicaCount: 3
image:
repository: nginxConvert a small OpenAPI path and response definition.
{ "openapi": "3.0.3", "paths": { "/health": {} } }
openapi: 3.0.3
paths:
/health: {}Inspect nulls, booleans, numeric-looking strings, multiline text, and special characters.
{ "empty": null, "code": "0012", "enabled": false }
empty: null
code: '0012'
enabled: false| JSON / YAML concern | Conversion behavior |
|---|---|
| Nested data and scalar types | Objects, arrays, strings, numbers, booleans, and nulls are preserved unless you enable a data-changing option. |
| Indentation and quotes | YAML uses indentation for nesting. js-yaml adds quotes automatically when a plain scalar could be ambiguous; quote preferences affect strings that are quoted. |
| Key order | Keys normally follow JavaScript enumeration order. Sorting deliberately changes the order, and integer-like keys can follow JavaScript ordering rules. |
| Numbers | JavaScript number parsing can lose precision outside ±9007199254740991. Quote large identifiers or exact digit sequences. |
| YAML-only features | JSON cannot carry comments, anchors, aliases, tags, presentation choices, or multiple documents. YAML-to-JSON resolves data and discards those features; multiple documents are rejected. |
JSON requires double-quoted keys and strings and does not allow trailing commas, comments, undefined, or functions. The editor reports the detected line, column, and nearby token so you can correct the source without losing it.
No. Parsing and output generation run in this browser with js-yaml 4.1.0, and document contents are not submitted for conversion. The page and its same-origin dependency still have to be loaded normally.
By default, object keys are emitted in JavaScript enumeration order, which normally follows the parsed JSON order. Turning on Sort object keys deliberately changes that order, and integer-like keys may follow JavaScript ordering rules.
The converter uses js-yaml 4.1.0 and emits YAML supported by that library. JSON scalar values map cleanly to common YAML 1.2 types, but this tool is not a full YAML specification conformance checker.
js-yaml automatically quotes strings when plain text would be ambiguous. You can prefer single or double quotes and force quotes for non-key strings; multiline text may still use YAML block scalar syntax when appropriate.
No. JSON has no equivalent for those YAML features. YAML to JSON parses one YAML document into data, so comments and presentation details are discarded, aliases are resolved, and multiple documents are rejected.
It recursively removes null-valued object properties and null array items before output. This changes the data rather than only formatting it, so the option is off by default.
Not always. Parsing uses JavaScript numbers, so integers outside the safe range of minus 9,007,199,254,740,991 to plus 9,007,199,254,740,991 can lose precision. Quote identifiers and large integer-like values when exact digits matter.
The visible file picker and drag-and-drop importer accept one .json, .yaml, or .yml file up to 2 MB. Automatic conversion pauses above 500 KB; use the Convert button for those larger documents.
Conversion makes no document-content request once the page and its same-origin js-yaml file are available. It can keep working in an already loaded tab, but a fresh offline visit depends on whether your browser has cached the page assets.