Loading…

How to use HTML Table to CSV

Paste your HTML table markup (including the <table> tag) into the input box, then click Convert. Copy the generated CSV or JSON array-of-objects. The first row is used as column headers for the JSON output.

Frequently asked questions

How does it handle commas inside cells?

Cells containing a comma, double-quote, or line break are automatically wrapped in double quotes, and any inner double-quotes are escaped by doubling them (" becomes ""), following the standard CSV/RFC 4180 rules.

What is the JSON output format?

The JSON is an array of objects. The first table row is treated as the header, so each following row becomes an object keyed by those header names. Empty headers fall back to column1, column2, etc.

Does it support colspan and rowspan?

The parser walks each <tr> and reads every <th>/<td> in order, so merged cells using colspan or rowspan are not expanded to fill the spanned positions. Each cell maps to a single CSV/JSON field.

More HTML Tools

Newline to BR Converter
Convert plain-text line breaks into HTML <br> tags (nl2br), with an optional XHTML self-closing mode and a reverse br-to-newline mode
Text/SVG to Data URI
Encode text, SVG or CSS into a base64 or URL-encoded data URI you can embed inline in HTML or CSS with no external file
Meta Tag Generator
Generate complete SEO meta tags including title, description, Open Graph, and Twitter Cards
Open Graph Generator
Generate Open Graph and Twitter Card meta tags for social media sharing optimization
HTML Table Generator
Generate semantic HTML tables from rows and columns input with customizable styling
HTML List Generator
Generate ordered or unordered HTML lists from text input with proper markup structure
HTML Color Code Generator
Generate HTML color code snippets in hex, RGB, RGBA, and HSL formats with examples
HTML Link Generator
Generate anchor tag with href, target, rel, title and all link attributes configured
HTML Image Tag Generator
Generate img tag with src, alt, width, height, srcset, loading and all image attributes
HTML Button Generator
Generate styled HTML button code with classes, attributes, and event handlers
iFrame Generator
Generate iframe embed code with src, width, height, sandbox, and all iframe options
HTML Input Generator
Generate form input fields with labels, types, validation, and accessibility attributes

← View all HTML ToolsBrowse all 1,100+ tools →