Table to JSON Generator
This JSON generator turns a table into JSON. Build a grid from scratch, paste CSV or a Markdown table, or upload an Excel sheet, then copy or download the JSON. It is handy for API mock data, fixtures, config lists, and frontend prototypes. All conversion happens in your browser.
What Is JSON?
JSON (JavaScript Object Notation) is a text format for structured data, standardized in RFC 8259. It has objects ({} with key–value pairs), arrays ([]), strings, numbers, booleans, and null. In JavaScript you read and write it with JSON.parse() and JSON.stringify(), documented on MDN.
Four JSON Shapes from One Table
Given this table:
| name | age |
|---|---|
| Alice | 30 |
| Bob | 25 |
Object Array (default), one object per row, keyed by header. This is the shape most REST APIs return:
[
{ "name": "Alice", "age": "30" },
{ "name": "Bob", "age": "25" }
]
2D Array, rows as arrays with the header as the first row:
[["name", "age"], ["Alice", "30"], ["Bob", "25"]]
Column Array, one array per column, a common input format for charts:
{ "name": ["Alice", "Bob"], "age": ["30", "25"] }
Keyed Array, the first column becomes the key of each record, useful for lookups and i18n dictionaries:
{ "Alice": { "age": "30" }, "Bob": { "age": "25" } }
Where It Helps
- Turn a spreadsheet or CSV export into JSON for an API mock or test fixture
- Write seed data by hand in a grid instead of typing brackets and quotes
- Convert a Markdown or HTML table from documentation into JSON your code can read