Data Format Converter
Convert YAML, JSON, CSV, TOML, XML, INI and .env files between formats, with options for separators, types and indentation.
Runs in your browser. Nothing is uploaded.
How to use the Data Format Converter
- Pick a conversion in Convert, for example YAML → JSON, CSV → JSON or .env → JSON or YAML.
- Paste your data into the left box, open a file, or press Load example for a sample of the chosen format.
- The result appears on the right as you type. Adjust the options next to Convert, such as indentation, the CSV separator or number detection.
- Copy or download the result. Use result as input moves it to the left and flips the direction, so you can convert back.
Move data between formats
Data rarely stays in one format. An API returns JSON, a colleague sends a CSV export, a Python project keeps its settings in TOML and an old app still reads INI. This converter handles the common text formats, including YAML, in one place: pick the direction in Convert, paste the data, and the result appears as you type. Because every conversion shares one box, you can switch direction or format without copying anything between tabs.
YAML
YAML to JSON expands anchors, aliases and << merge keys, so you see the values each section really
gets, and keeps several documents apart. JSON to YAML quotes strings that YAML would otherwise misread,
such as NO, on or 0644. YAML also converts to and from XML (attributes become @name keys), TOML
and CSV, so a Kubernetes manifest, a list of records or a config file can move to whichever format the
next tool needs. To format, validate or explore YAML, use the YAML formatter.
CSV and JSON
CSV to JSON detects the separator (comma, semicolon, tab or pipe), uses the first row as keys when you
want it to, and handles quoted fields with commas and line breaks. Number detection never touches
values with leading zeros. JSON to CSV takes an array of records, collects every key that appears into
the header, and can flatten nested objects into dot.path columns, ready for a spreadsheet.
TOML, INI and .env
TOML to JSON reads pyproject.toml, Cargo.toml and other TOML 1.0 files, including dates and
arrays of tables. JSON to TOML writes nested objects as [sections] and lists of objects as
[[arrays]]. INI to JSON turns [sections] into objects and understands ; and # comments, which
covers php.ini, .gitconfig, my.cnf and many app settings. The .env option reads KEY=value
lines with quotes, export prefixes and multi-line values, can expand ${VARIABLES}, and writes JSON
or YAML.
Notes, not surprises
When a conversion has to change something, such as dropping nulls for TOML, rows with a different number of cells, or duplicate keys, the message under the boxes says so. Nothing is silently lost.
Everything runs locally in your browser.
Frequently asked questions
Which conversions are included?
YAML to and from JSON, XML, TOML and CSV; CSV to JSON and back; TOML to JSON and back; INI files to JSON; and .env files to JSON or YAML. For other XML conversions use the XML Converter, and for spreadsheets the Excel Converter.
Will CSV values like 007 or 1e5 change?
Only if you ask. With Detect numbers and true/false ticked, plain numbers become numbers, but values with leading zeros, such as postcodes and IDs, stay text. Untick it to keep every value exactly as written.
How are nested JSON objects turned into CSV columns?
With Flatten nested objects, {"customer": {"name": "Ana"}} becomes a customer.name column. Arrays inside a record are written as JSON text in one cell. If the top level is an object with one array inside, that array is used as the rows.
Why does JSON to TOML fail for some input?
TOML files must start with a table of keys, so the top level of the JSON has to be an object, not a list or a single value. TOML also has no null, so null values are left out and the tool tells you how many.
Is my data uploaded?
No. Every conversion runs in your browser, so config files with passwords and exports with customer data stay on your device.
Tutorials
How to convert a semicolon CSV to JSON without losing zeros
Convert a European-style semicolon CSV export to JSON, keep product codes like 0007 intact and turn empty cells into null.
How to read a pyproject.toml file as JSON
Convert a Python pyproject.toml to JSON to see how its dotted tables nest, then pull out dependencies and tool settings with any JSON tool.
How to see YAML anchors and merge keys as plain JSON
Convert a YAML file that uses anchors, aliases and << merge keys into JSON, so you can check the final settings each environment really gets.