# JSON to Table Viewer

> Paste JSON and view it as a readable, sortable HTML table. Columns merge keys from every object, nested values show inline, and you can copy it as CSV.

- Open the tool: https://overtooled.com/json-to-table
- Category: Developer
- Privacy: Runs entirely in your browser. Nothing is uploaded, no account is needed, and it works offline once loaded.
- Price: free, no sign-up
- Keywords: json, table, viewer, csv, data, grid

## In short

View JSON data as a readable, sortable HTML table.

## Overview

Turns a JSON array of objects into a sortable HTML table, with a CSV copy of the result. Built for quickly reading API responses or exported records without opening a spreadsheet. The table updates on every keystroke.

## Features

- Parses input with JSON.parse; a single top-level object becomes a one-row table
- Columns are the union of all keys across every object, in the order they are first seen
- Missing keys show as empty cells; nested objects and arrays are shown inline as JSON strings
- Click a column header (a keyboard-reachable button) to sort ascending, click again for descending (shown as ^ / v)
- Sort is numeric when both cells parse as numbers, otherwise locale-aware text comparison
- Footer shows the row x column count
- CSV version of the table (in the current sort order) with Copy and a pipeline button above the table
- JSON parse errors, and arrays containing non-object items, are reported under the input

## How to use it

1. Paste a JSON array such as [{"name": "Alice", "age": 30}] into the JSON Input box
2. Read the table that appears below
3. Click a header to sort by that column; click again to reverse
4. Use the copy button above the table to copy it as CSV

## Inputs

- JSON text: an array of objects, or a single object (treated as one row)
- Top-level primitives (a bare number or string) are rejected with "Input must be a JSON array or object"

## Outputs

- On-screen HTML table
- CSV text: header row plus one line per row; cells containing commas, quotes or newlines are quoted with doubled quotes

## Limits and notes

- Nested data is not flattened into extra columns -- it stays as a JSON string in one cell
- All rows are rendered to the page with no pagination or virtualization, and parsing runs on the main thread on every edit
- Empty cells count as 0 in numeric sorting (Number('') is 0)
- Nothing is saved: input is not persisted in localStorage
- Runs entirely in the browser; nothing is uploaded

## Questions and answers

### How does the JSON to Table Viewer work?

The tool parses your input with JSON.parse(). If the top level is a single object it is treated as one row; an array of objects becomes one row per object. Column headers are the union of every key, in the order first seen. Missing keys become empty cells and nested objects or arrays are shown inline as JSON strings. Clicking a header sorts rows numerically when both values parse as numbers, otherwise with a locale-aware text comparison.

### What JSON formats does it support?

An array of objects (the common API format) or a single object, which becomes a one-row table. Nested objects and arrays are not flattened into extra columns; they appear as JSON text inside the cell. A bare number or string at the top level is rejected.

### Can I sort the table columns?

Yes. Click any column header to sort the data alphabetically or numerically. Click again to reverse the sort order.

### Can I handle large JSON files?

Moderately sized data works fine. Every row is rendered into the page and the JSON is re-parsed on each edit, so very large inputs (tens of thousands of rows) can make the page sluggish. Everything stays in your browser.

## Related tools

- [JSON / CSV Converter](https://overtooled.com/json-csv.md): Convert JSON to CSV and CSV to JSON in either direction
- [Column Extractor](https://overtooled.com/column-extractor.md): Extract specific columns from CSV, TSV, or tabular data
- [File Viewer](https://overtooled.com/file-viewer.md): Drop any file to view it -- images, videos, audio, code, JSON, CSV, PDF, fonts, and binary files with magic bytes detection
- [Mock Data Generator](https://overtooled.com/mock-data-generator.md): Generate realistic fake data for testing, prototyping, and demos

---
Overtooled: 179 free tools that run in your browser. Index of all tools: https://overtooled.com/llms.txt
