Hayyat Networks
Developer Tools

Free JSON, YAML, XML and CSV Converter

Convert data between JSON, YAML, XML and CSV in any direction. Invalid input is caught with a clear message that points to the exact line and column.

Quick answer

JSON, YAML, XML and CSV Converter: Convert data between JSON, YAML, XML and CSV in any direction. Invalid input is caught with a clear message that points to the exact line and column. It is free, needs no sign-up and runs in your browser. How to use it: 1) paste your data, open a file or load the sample; 2) pick the format to convert to. The input format is detected automatically; 3) click Convert, then copy or download the result. The tool reads your data into a neutral structure of objects, lists and values, then writes it out in the format you choose. It detects the input format by looking at the first characters and the shape of the first lines, and you can override the detection at any time.

Free No sign-up Runs in your browser
Loading the tool…

How the converter works

The tool reads your data into a neutral structure of objects, lists and values, then writes it out in the format you choose. It detects the input format by looking at the first characters and the shape of the first lines, and you can override the detection at any time. Everything runs in your browser, so it also works offline.

Supported directions

  • JSON is parsed strictly. Errors such as trailing commas, single quotes or missing commas are reported with the line and column.
  • YAML uses the YAML 1.2 core schema. Several documents separated by --- become one list.
  • XML attributes become keys that start with @, text next to child elements becomes #text, and repeated elements become lists. Converting back produces the same XML shape.
  • CSV handles quoted fields, commas inside quotes and line breaks inside quotes. The delimiter (comma, semicolon, tab or pipe) is detected automatically.

Options

Choose 2 spaces, 4 spaces or tabs, or minify the output to one line. Numbers and true or false values in XML and CSV can be detected so they become real numbers and booleans. Values with leading zeros, such as ZIP codes, stay as text.

Converting to CSV

CSV needs a list of records. When your data is an object, the tool uses the first list it finds inside it. Nested objects are flattened into dot.key columns, and you can expand them again when converting CSV back.

Limitations

XML comments and processing instructions are not kept, and namespaces stay as part of the element name. YAML anchors are expanded. Very large numbers in JSON may lose precision beyond 15 digits.

FAQ

JSON YAML XML CSV Converter FAQs

How do I convert JSON to YAML?

Paste your JSON into the box, choose YAML under Convert to and click Convert. The tool checks the JSON first and shows the exact line of any error. The YAML output uses block style with 2 spaces by default, and you can copy it or download it as a .yaml file.

How are XML attributes handled when converting to JSON?

Each attribute becomes a key that starts with @, for example @id. Text that sits next to child elements is stored under #text. Repeated elements with the same name become a list. This keeps all the information, so you can convert the JSON back to almost identical XML.

Can I convert nested JSON to CSV?

Yes. Nested objects are flattened into columns with dotted names such as address.city, and lists inside a record are stored as JSON text in one cell. When you convert the CSV back, tick the option to turn dot keys into nested objects and the original structure returns.

Is my data uploaded anywhere?

No. Parsing and conversion run entirely in your browser using bundled code, so the tool works offline and your configuration files, API responses and customer lists never reach a server. You can safely use it for private data, although you should still avoid pasting live passwords or keys.

Free consultation

Want our experts to implement these improvements?

Get professional support from Hayyat Networks. Request a free consultation.