Load a web table into a SQL database
Export the table to CSV with LightCube Data Extractor, then load it: in SQLite run .mode csv and .import file.csv tablename; in Postgres create the table and use \copy tablename FROM file.csv CSV HEADER. Check row counts against the page.
Do this in one click with LightCube Data Extractor, a free Chrome extension. No account needed.
Add to Chrome, free ↗Step by step
- Extract the table and click CSV.
- SQLite: sqlite3 data.db, then .mode csv and .import table.csv mytable.
- Postgres: CREATE TABLE with columns, then \copy mytable FROM table.csv CSV HEADER.
- Run SELECT COUNT(*) and compare with the page.
Example
sqlite3 data.db
.mode csv
.import table.csv results
SELECT COUNT(*) FROM results;
Types
SQLite .import creates text columns when the table is new; cast in queries or create the table with types first. Clean currency symbols before numeric loads.
JSON route
For document stores, export JSON instead (10 free per day). See table to JSON.
Cleaning before you load
Strip currency symbols and thousands separators so numeric columns load as numbers, convert dates to ISO format (YYYY-MM-DD), and make header names lowercase with underscores. A quick check of row count before and after import confirms nothing was dropped.
FAQ
- Header row?
- SQLite uses it as column names for a new table; Postgres needs HEADER.
- Encoding?
- The CSV is UTF-8.
- Free?
- Yes.
Related guides
Updated 2026-11-11.