CSV JSON HTMLTable Converter icon

CSV JSON HTMLTable Converter

Convert, replace, or style HTML tables, CSV, and JSON data.

Replace

AI-generated

Summary

Replace a selected table in an HTML document with replacement content. Choose HTML, CSV, JSON, or n8n Object as the replacement format; non-HTML content is converted to an HTML table, with optional table styling and data sorting or field selection.

Inputs

  • Source HTML (required) — HTML document containing the table to replace.
  • Replacement Content Format (required) — Format of the replacement content: HTML, CSV, JSON, or n8n Object.
  • Replacement Content (required) — Content to insert in place of the selected table.
  • Show Style Options — Enables simple styling options for generated tables; hidden when the replacement format is HTML.
  • Style options — When enabled for non-HTML replacements, set header and body horizontal or vertical alignment, numeric alignment, banded rows, text wrapping, and table width. Blank or Unchanged values leave the corresponding setting unspecified.
  • Table Selection Mode — Choose Simple presets or Advanced CSS selectors to locate the table in the source HTML.
  • Table Preset — In Simple mode, select all tables, the first or last table, a table after a heading, a table with a caption, or a custom selector. Heading, caption, index, and selector fields appear as applicable.
  • HTML Table Selector — In Advanced mode, CSS selector for tables to target.
  • HTML Element Selector — In Advanced mode, CSS selector for elements within which to search for tables.
  • Include Table Headers — Whether to include headers in generated HTML or CSV tables.
  • Show Data Manipulation — Enables optional sorting and field selection for replacement data.
  • Sort By Field and Sort Order — Optionally sort replacement data by a field, ascending or descending.
  • Fields — Optionally include and reorder fields using a comma-separated list; field matching is case-insensitive.
  • Wrap Output — Whether to place the result under an output field.
  • Output Field Name — Field name used when Wrap Output is enabled; defaults to convertedData.

Output shape

A single output item containing the updated HTML document, optionally wrapped in the configured output field.

The selected table is replaced in the source HTML. Styling and data manipulation apply to generated replacement tables; style controls are hidden for HTML replacement content. Table selection controls are declared in the operation properties, though some selector fields have display conditions referencing other operations or formats.

Links

Discussion