About the Data Format Converter
Convert data between the formats developers use every day. JSON converts to and from YAML, XML, CSV, TOML and Excel (.xlsx), and JSON can also be turned into SQL CREATE TABLE/INSERT statements, MongoDB insert commands or a Prisma schema model.
Every conversion uses a spec-compliant parser — YAML 1.2, TOML 1.0, RFC 4180 CSV, the browser’s native XML parser and SheetJS for spreadsheets — so edge cases like anchors, quoted commas and XML attributes are handled correctly. Pick a conversion from the dropdown, or use the ⇅ button to send the output back as input in the reverse direction.
How to use it
- Choose a conversion, for example JSON → YAML or Excel → JSON.
- Paste your data, drop a file onto the input, or click Upload (.json, .yaml, .xml, .csv, .toml, .xlsx).
- The result appears as you type. Copy it, download it, or for JSON → Excel download a real .xlsx workbook.
- Use the ⇅ button to reverse the conversion with your output as the new input.
Features
- 13 conversions in one place
- Spec-compliant YAML, TOML, CSV and XML parsing with clear error messages
- Real .xlsx import and export — nothing uploaded
- Nested JSON flattened to dot-notation columns for CSV and Excel
- SQL for PostgreSQL, MySQL and SQLite with inferred column types
Supported conversions
JSON to YAML
YAML is a human-friendly superset of JSON used for Kubernetes manifests, Docker Compose, GitHub Actions, OpenAPI specs and countless config files. This converter turns any JSON document into clean YAML using a spec-compliant serializer, so strings that look like numbers or booleans are quoted and nested structures keep their meaning.
Because every JSON document is already valid YAML, the conversion is lossless: you can convert the result back with the YAML to JSON tool and get identical data.
YAML to JSON
Convert YAML into JSON for APIs, JavaScript code or tools that only accept JSON. The converter uses a full YAML 1.2 parser, so anchors and aliases (& and *), merge keys (<<), multi-line block strings (| and >), flow collections and comments are all handled correctly.
If the YAML is invalid, you get the parser's error message with the problem location instead of silently wrong output.
JSON to XML
Convert JSON into well-formed XML for SOAP services, legacy integrations, RSS feeds or configuration files. Object keys become element names, arrays become repeated sibling elements and special characters (&, <, >, ") are escaped automatically.
Keys that start with @ are written as attributes and a #text key becomes the element's text content — the same convention the XML to JSON tool produces, so you can round-trip data.
XML to JSON
Convert XML documents to JSON using your browser's native XML parser. Attributes are prefixed with @, repeated elements become arrays, text mixed with attributes is stored under #text, and numeric and boolean text is converted to real JSON numbers and booleans.
It's useful for working with SOAP responses, RSS and Atom feeds, sitemaps, Maven POMs and other XML from JavaScript or JSON-only tools.
JSON to CSV
Convert a JSON array of objects into CSV that opens cleanly in Excel, Google Sheets, Numbers or any data tool. The column list is the union of keys across all rows, nested objects are flattened into dot-notation columns such as address.city, and arrays are stored as JSON text.
Values containing commas, quotes or line breaks are quoted and escaped according to RFC 4180, so the file imports without broken columns.
CSV to JSON
Convert CSV or TSV data into a JSON array of objects, using the first row as keys. The parser follows RFC 4180, so quoted fields, embedded commas, escaped quotes and multi-line cells are read correctly, and the delimiter — comma, tab, semicolon or pipe — is detected automatically.
Numbers, true/false and empty cells are converted to JSON numbers, booleans and null, so the output is ready for APIs and JavaScript code.
JSON to TOML
Convert JSON to TOML, the configuration format used by Cargo (Rust), pyproject.toml (Python), Hugo, Netlify and many other tools. Nested objects become [tables], arrays of objects become [[arrays of tables]], and simple values stay inline.
TOML has no null type, so null values are dropped; the top level must be an object.
TOML to JSON
Convert TOML configuration files to JSON. The converter uses a TOML 1.0-compliant parser, supporting tables, inline tables, arrays of tables, dotted keys, multi-line strings and dates.
Handy for inspecting Cargo.toml, pyproject.toml or netlify.toml files, or feeding their values into JSON-based tooling.
Excel to JSON
Convert Excel spreadsheets to JSON without uploading them anywhere. Choose an .xlsx, .xls or .ods file and the first sheet is read in your browser, or simply copy a range of cells in Excel or Google Sheets and paste it into the input.
The first row becomes the property names and each following row becomes an object. Numbers and TRUE/FALSE are converted to JSON types and empty cells become null.
JSON to Excel
Turn a JSON array into a real Excel workbook (.xlsx) you can download and open in Excel, Google Sheets, LibreOffice or Numbers. Each object becomes a row, keys become column headers and nested objects are flattened into dot-notation columns.
A tab-separated preview is shown in the output panel, and the .xlsx file is generated in your browser when you click Download .xlsx.
JSON to SQL
Generate a CREATE TABLE statement and a multi-row INSERT from JSON data. Column types are inferred from all rows — INTEGER, BIGINT, DOUBLE, BOOLEAN, VARCHAR(n), TEXT or TIMESTAMP — with dialect-specific output for PostgreSQL, MySQL and SQLite.
Strings are escaped safely, missing values become NULL and nested objects are flattened into dot-named columns, making it easy to seed a database or load test fixtures.
JSON to MongoDB
Wrap JSON documents in a MongoDB shell command you can paste into mongosh, MongoDB Compass or Atlas Data Explorer. Single objects produce insertOne, arrays produce insertMany, and collection names that aren't valid identifiers use db.getCollection().
It's a fast way to seed development databases or reproduce documents from an API response.
JSON to Prisma
Generate a Prisma schema model from sample JSON. Field types (String, Int, Float, Boolean, DateTime, Json and scalar lists) are inferred from your data, fields that are null or missing in some rows become optional, and snake_case keys are renamed to camelCase with @map.
An id field and createdAt timestamp are added when your data doesn't have them, so the model is ready for prisma migrate.
Frequently asked questions
Is the conversion lossless?
Yes. YAML 1.2 is a superset of JSON, so every value, type and structure is preserved.
Why does my YAML give an error?
The most common causes are tabs used for indentation (YAML requires spaces), inconsistent indentation, and a missing space after a colon. The error message tells you which line to check.
How are JSON arrays represented in XML?
XML has no array type, so each item becomes a repeated element with the array's key as its name. Top-level arrays are wrapped in the root element with <item> children.
Why does a single element sometimes become an object and sometimes an array?
XML doesn't say whether an element can repeat. When an element appears once it becomes a value; when it appears multiple times it becomes an array. Normalise in your code if the count can vary.
My JSON has nested objects — what happens?
They're flattened: {"address": {"city": "London"}} becomes a column named address.city. Arrays are written as JSON strings.
My CSV uses semicolons — will it work?
Yes. European-locale exports often use semicolons; the delimiter is detected from the header row.
What happens to null values?
TOML has no null, so keys with null values are omitted from the output.
How are TOML dates converted?
Date-times become ISO 8601 strings in the JSON output.
Which sheet is converted?
The first worksheet in the workbook. To convert another sheet, move it to the first position or copy its cells and paste them in.
Can I paste the result straight into a sheet?
Yes — copy the output; it is tab-separated, so it pastes into separate cells in Excel and Google Sheets.
Is the SQL safe to run?
Values are escaped by doubling single quotes and identifiers are quoted when needed. Always review generated SQL before running it against production data.
How do I add ObjectId or Date values?
Replace the relevant strings with ObjectId("…") or new Date("…") in the output — plain JSON can't express BSON types.
Why are nested objects typed as Json?
A nested object could be a relation or embedded data. Json is the safe default; turn it into a related model if you need a separate table.
Is my data uploaded anywhere?
No. All processing happens in JavaScript inside your browser tab. Your input is never sent to a server, logged or stored, so it is safe to use with internal or sensitive data.