JSON to YAML
Serialize parsed JSON with two- or four-space YAML indentation.
Runs in your browser. Nothing is uploaded.
How JSON becomes YAML
JSON to YAML reads a complete JSON value, parses it, and serializes the resulting data as YAML. This is a data conversion rather than a text replacement. Braces, brackets, commas, and quoted keys are replaced with YAML mappings and sequences while the underlying values are kept where YAML can represent them. The result is meant to be easy to read and edit.
Paste an object such as {"name":"TheDevTab"}, use the sample, or drop a JSON file into the input area. The page parses JSON before calling the converter, so a trailing comma, single-quoted key, or other syntax error is reported instead of producing a plausible but wrong YAML document. For the reverse direction, use YAML to JSON.
Objects, arrays, and scalar values
Object properties become indented YAML mapping entries. Arrays become sequence items with a dash, and nested values are represented by additional indentation. Strings, numbers, booleans, and null are written using YAML scalar syntax. The converter does not guess a business schema, rename fields, or turn a list into a table.
YAML is indentation-sensitive, so inspect the generated whitespace before putting the result in a configuration file. A valid YAML document can still be rejected by the application that reads it if a required key is missing or a value has the wrong meaning. Use JSON Formatter when you want to inspect the source JSON first.
What conversion does not preserve
JSON does not contain comments, anchors, aliases, custom tags, or YAML-specific scalar styles. There is therefore no comment text to carry into the result. If you later edit the YAML with comments or anchors, converting it back to JSON produces the parsed data, not those authoring notes. Keep the original YAML when those details matter.
YAML parsers can have version-specific rules for unquoted values such as dates, yes/no words, and numbers with unusual forms. This page creates ordinary YAML from JSON, but the receiving parser still decides how it interprets the file. Test the output with the same parser used in production.
Review before sharing
Check the root shape, indentation, sequence order, and sensitive fields before downloading converted.yaml. Conversion does not remove private keys or redact secrets. All parsing, serialization, file reading, and downloading happen in your browser, and nothing is uploaded. If the recipient needs XML instead, compare the result with JSON to XML and confirm that its schema matches the receiving system.
FAQ
Can I convert private JSON to YAML without uploading it?
The JSON is parsed and serialized by the YAML engine in your browser. The input is never uploaded, and TheDevTab never receives it.
What JSON can I convert to YAML?
Any valid JSON value can be converted, including objects, arrays, strings, finite numbers, booleans, and null. Invalid or empty JSON is reported before the serializer runs.
Will YAML comments be added to the output?
No. JSON has no comments, so the converter writes only the parsed data and does not invent documentation. The output is generated from values rather than from the original JSON formatting.
How are arrays represented?
Arrays are written with hyphen sequence markers and nested indentation, while objects become YAML mappings. Empty arrays and objects use [] and {} instead of adding child lines.
When does the serializer quote strings?
Strings are quoted when they are empty, padded, or resemble YAML booleans, null, numbers, dates, directives, or structural syntax. This prevents a string such as true, 2024-01-01, or 01 from being read as a different scalar.
Which indentation sizes are available?
The output supports 2-space and 4-space indentation. Both choices represent the same parsed JSON values and change only the YAML layout.