Guide

How to Convert a JSON Array to an HTML or Markdown Table

Convert a valid, non-empty top-level JSON array into HTML, Markdown, or both table formats. Object arrays become columns based on first-seen keys, while scalar arrays become a single-column table.

Tool JSON to Table Converter

Understand the input and output

JSON to Table is useful when structured records need a readable table for a web page, documentation, or a Markdown workflow. The input must be a top-level JSON array. A non-empty array of scalar values becomes a single-column table, while an array of objects becomes a table whose columns follow the order in which keys first appear. Missing keys leave blank cells.

Convert a JSON array to a table

  1. Prepare valid JSON whose top-level value is an array, such as [ {"name":"Ava","role":"Editor"}, {"name":"Ben"} ]. Do not submit a standalone object. Blank input, invalid JSON, and a valid JSON value that is not an array produce an unsuccessful result rather than table output.

  2. Enter the array as the tool input.

  3. Choose an output format. HTML is the default when no format is supplied. You can choose Markdown, or choose the combined format to generate both HTML and Markdown representations.

  4. Convert the input and inspect the generated table. For object arrays, the first-seen key order determines the columns, and an object without a key receives an empty cell in that column. For scalar arrays, expect one column.

  5. If you choose Markdown, review cell values containing pipe characters. The Markdown output escapes those characters. HTML table content also escapes characters with special meaning in HTML.

  6. If the input contains both objects and non-object values, check the rows carefully. Non-object values appear only in the first column, while object values use the collected object-key columns, so the result may not be rectangular for every value.

Interpret the result

The result is a rendered table representation, not a reorganization of a standalone JSON object. With object arrays, column order reflects first appearance rather than a separately chosen schema, and missing values are shown as blank cells. With scalar arrays, the single-column layout is expected.

Markdown normally includes a header row and a separator row when at least one column header was collected. An edge case such as [{}] can produce Markdown rows without those header lines because no column header exists. Empty arrays do not produce a table, so an empty result does not mean the converter found records with no values.

For reliable output, validate the JSON first, keep the top-level value as an array, and review mixed arrays manually before using the result in documentation or a page.

Worked example

A team member converts two records to Markdown documentation and wants the missing role value to remain visibly blank.

Enter the JSON array, select Markdown, and review the generated rows: [{"name":"Ava","role":"Editor"},{"name":"Ben"}].

The Markdown result has a name header and a role header in first-seen order, followed by a separator row. Ava has values in both columns, while Ben has a blank role cell.

Limitations

  • Mixed arrays are not fully rectangular for every value because non-object values occupy only the first column.

Common errors

  • Cause: the submitted JSON is blank, invalid, or has a top-level value other than an array. Correction: validate the JSON and make sure the outermost value is an array before converting.

FAQ

What JSON structure can I convert to a table?

The converter accepts a top-level JSON array, not a standalone object. A non-empty array of objects becomes a multi-column table based on first-seen keys; an array of scalar values becomes a single-column table.

What output format is selected by default?

HTML is used when no output format is supplied. Selecting the combined format generates both HTML and Markdown representations.

How are mixed JSON arrays handled?

A mixed array can produce uneven rows: non-object values are placed only in the first column, while object values use the collected object-key columns. Review this output before using it as a uniformly rectangular table.

Tool

JSON to Table Converter