🔄 JSON Converter
Transform JSON into CSV, XML, YAML, TypeScript, Java POJO, SQL and more.
About JSON Converter
JSON is the de-facto standard for data exchange, but most downstream systems — spreadsheets, databases, config files, typed languages — require a different format. This free online JSON converter transforms any valid JSON into 9 widely-used formats instantly, with zero server round-trips. Your data never leaves your browser.
Whether you need to import API data into a spreadsheet as CSV, seed a database with SQL INSERT statements, generate TypeScript interfaces from a sample payload, or produce a Markdown table for documentation, this tool handles it in one click. Each format comes with configurable options — choose your delimiter, indentation, root element name, dialect, and more.
How to convert JSON
- Paste your JSON into the input panel. The validator confirms it is valid JSON before enabling the format buttons.
- Click a format tab (CSV, XML, YAML, TypeScript, Java, SQL, Markdown, TOML, or PHP) to run the conversion immediately.
- Adjust options in the output panel — delimiter, indent size, root element name, SQL dialect, etc. — and the output updates live.
- Copy or Download the result using the header buttons. CSV output also has a Table view to preview rows and columns.
- Use ↵ Wrap to soft-wrap long lines in formats like XML or YAML without horizontal scrolling.
Supported output formats
📊 CSV
Flattens nested objects with dot-notation column names. Auto-detects inner arrays from wrapped objects like {users:[...]}. Configurable delimiter (comma, semicolon, tab, pipe) and optional header row.
🏷️ XML
Full recursive XML with configurable root and item element names. Proper escaping of &, <, >, and ".
📄 YAML
Clean YAML respecting all data types. Quotes strings that look like numbers. Handles nested objects and arrays. Configurable indent and line-wrap width.
🔷 TypeScript
Generates interface or type alias declarations. Nested objects get their own named interface. Choose between interface and type syntax.
☕ Java POJO
Full class with getters/setters and @JsonProperty annotations. Optional Lombok @Data, @NoArgsConstructor, and @AllArgsConstructor.
🗄️ SQL INSERT
Batched INSERT statements. Flattens nested objects to columns. Choose MySQL, PostgreSQL, or SQLite dialect and batch size.
📋 Markdown
GitHub-flavoured table with aligned columns. Pipe characters in values are automatically escaped.
⚙️ TOML
Sections using [table] and [[array-of-tables]] syntax. Requires a top-level object — wrap bare arrays in a key.
🐘 PHP Array
Nested associative array syntax ready to paste into any PHP file. All types including booleans and null are correctly represented.
Frequently Asked Questions
My JSON is an array, not an object — will CSV conversion work?
Yes. The converter handles both top-level arrays (e.g. [{...},{...}]) and wrapped objects (e.g. {"users":[...]}). For wrapped objects it automatically detects the array inside. Each array element becomes a CSV row, and nested object fields are flattened using dot notation (e.g. address.city).
How does TypeScript interface generation work?
The converter inspects the actual values in your JSON to infer types: strings become string, numbers become number, booleans become boolean, nulls become null, arrays get typed as T[], and nested objects get their own interface with a Pascal-cased name derived from the key. You can choose between interface and type alias output.
Which SQL dialects are supported?
MySQL, PostgreSQL, and SQLite. The main difference is string quoting: MySQL uses backticks for identifiers, PostgreSQL uses double quotes, and SQLite uses double quotes or square brackets. All three produce batched multi-row INSERT statements for efficiency.
Why does YAML output quote some strings?
YAML parsers interpret bare strings like '123', 'true', 'null', 'yes', 'no', and strings starting with special characters (:, {, [, etc.) as non-string types. The converter quotes any string that could be misinterpreted to ensure round-trip fidelity.
What is the difference between Wrap ON and Wrap OFF in the output?
Wrap OFF (default) keeps the output as-is with a horizontal scrollbar for long lines — preserving the exact whitespace. Wrap ON soft-wraps long lines so they fold onto the next line without a scrollbar, making very wide XML or YAML easier to read without scrolling.