Skip to content
ZeroServer.tools

HTML Table to JSON

Convert HTML table markup to JSON or CSV — handles thead, th, colspan headers, and type coercion.

Preview

NameRoleCountryActive
Alice ChenFrontend EngineerCanadatrue
Bob MüllerBackend EngineerGermanyfalse
Carlos RiveraDevOpsMexicotrue

How HTML table parsing works

The parser locates the first <table> element using a regex tokenizer — no DOM required. It extracts <tr> rows, then pulls cell content from<th> or <td>tags, stripping inner HTML and decoding common HTML entities. With "First row is header" enabled, column names come from the first row; otherwise generic column_N keys are used.

Type coercion converts numeric strings to numbers, "true"/"false" to booleans, and empty cells to null. For the reverse conversion see JSON to Table. To parse CSV see CSV to JSON.

Private & free — this tool runs entirely in your browser.

Recommended: IndieKit Ship your Next.js startup in days.affiliate

Related Converters tools