Developer
Encoders, converters & dev utilities
Data-Format Converter (JSON ↔ CSV / YAML / XML)
Convert JSON ↔ CSV, YAML & XML (+ JSON→TypeScript) in your browser. Accurate, instant and free — for United States.
100% in-browser — nothing is uploaded
Converted output appears here.How the conversions work
One engine, every format pair
The converter parses your source into a single in-memory value, then serialises that value to the target format. Because every format shares that middle step, any source works with any target — JSON ↔ CSV, JSON ↔ YAML, JSON ↔ XML, plus TSV and a JSON → TypeScript interface.
JSON ↔ CSV / TSV
Payloads ↔ spreadsheets
- Nested keys flatten to a.b columns
- RFC-4180 quoting both ways
- Optional cell type inference
JSON ↔ YAML
Config-as-code
- YAML 1.2 — a JSON superset
- Round-trips to identical data
- Configurable indent
XML ↔ JSON · JSON → TS
Legacy & typing
- Repeated tags → arrays
- Attributes → @_ keys
- Infer a TypeScript interface
RFC-4180 quoting and type inference
CSV is deceptively fiddly. Getting quoting and type coercion right is where thin converters quietly lose or mangle your data — so both are handled explicitly here.
Quoting (RFC 4180)
Lossless fields
- Fields with a comma, quote or newline get wrapped in "…"
- A literal " is escaped as ""
- The parser reads quoted, multi-line fields back correctly
Type inference
Numbers, booleans, null
- On: 42, true, null become real types
- Off: every cell stays a string
- Turn it off for IDs, zips, 007
Watch leading zeros
Round-trip conventions that stay honest
YAML 1.2
No Norway problem
YAML 1.2 is a JSON superset. Unlike 1.1, unquoted no stays the string "no" — only true/false are booleans.
XML → JSON
Arrays & attributes
Repeated tags become arrays; attributes become @_-prefixed keys, e.g. <user id="1"/> → { "@_id": "1" }.
JSON → TypeScript
Infer an interface
Generates an interface from a sample object — strings, numbers, booleans, arrays and nested objects — a fast start for typing an API response.
Universal, spec-based — no per-region rules
Frequently asked questions
The converter turns any of JSON, CSV, TSV, YAML or XML into JSON, CSV, TSV, YAML, XML or a TypeScript interface. Common pairs include JSON to CSV, CSV to JSON, JSON to YAML, YAML to JSON, XML to JSON, JSON to XML, JSON to TSV and JSON to TypeScript. It parses the source into an in-memory value and then serialises that value to the target format, so any source-to-target combination works (TypeScript is output-only — it is generated, not parsed).
Nested objects are flattened into dotted-path columns: {"user":{"name":"Ada"}} becomes a column named user.name. The header row is the union of every key seen across all rows, in first-seen order, so rows with different shapes still line up. Values that are still objects or arrays after flattening are written as a JSON string inside the cell rather than being silently dropped.
Per RFC 4180. A field that contains the delimiter (comma or tab), a double quote, or a line break is wrapped in double quotes, and any double quote inside the field is escaped by doubling it (" becomes ""). The parser is a full RFC-4180 state machine, so it correctly reads quoted fields that themselves contain commas, escaped quotes and embedded newlines.
When converting CSV or TSV into another format, the tool can coerce cell text into real types: "42" becomes the number 42, "true"/"false" become booleans, and "null" becomes null. This is convenient but occasionally wrong — for example a leading-zero code like "007" or an ID would become 7. Toggle type inference off to keep every cell as a string, which is the safe choice for identifiers, phone numbers and zip codes.
No. The converter follows YAML 1.2, which is a strict superset of JSON. In the old YAML 1.1 spec, unquoted no, yes, on and off were parsed as booleans — so a list of country codes containing NO (Norway) silently became false. YAML 1.2 removed those implicit conversions, so only true/false are booleans and country codes survive as strings. YAML and JSON round-trip to identical data.
Elements become objects. Repeated child tags collapse into an array — <r><item>1</item><item>2</item></r> becomes {"r":{"item":["1","2"]}}. Attributes are surfaced as keys prefixed with @_ , so <user id="1"/> becomes {"user":{"@_id":"1"}}. Tag and attribute text is kept as raw strings so numeric-looking values are not coerced. Building XML back from JSON mirrors the same @_ attribute convention.
Yes. Choosing TypeScript as the target infers an interface from a sample JSON object: strings become string, numbers number, booleans boolean, arrays infer their element type from the first element (an empty array becomes unknown[]), and nested objects become inline object-literal types. It is a fast starting point for typing an API response — review optional/nullable fields yourself, since a single sample cannot show which keys are missing on other records.
No. Parsing and serialising both run entirely in your browser — your data is never sent to a server, logged or stored, and the tool works offline once loaded. That makes it safe to paste a real API payload or config file, which is exactly the case where server-side converters are risky.
Standards & references
Method: the source text is parsed to an in-memory JavaScript value and re-serialised to the target format. JSON follows RFC 8259; CSV/TSV follow RFC 4180 (quote " escaped as ""); YAML follows 1.2.2 (a JSON superset, no 1.1 "Norway problem"); XML follows 1.0 with repeated tags mapped to arrays and attributes to @_ keys. Everything runs in your browser — no data is sent to a server.
How we calculate this
Reviewed by Reckonist Editorial · Last reviewed 4 July 2026. Figures follow the methods and sources set out in our editorial standards.
This tool converts structured data between formats locally in your browser for developer convenience. Review converted output before relying on it — format conversions can involve lossy choices (nested-object flattening, CSV type inference, XML attribute mapping) that depend on your data.
Keep going
Same-category tools follow this colour; a cross-category link keeps its own.