Web insert tool
Archived early utility — a regex-powered scraper that turned messy copied web data into SQL INSERT statements for school database assignments.
Archived and obsolete — somewhere between 2012 and 2015, when I just started my IT journey, I built a small JavaScript utility for an annoyance that kept showing up on school projects: turning messy copied web data into SQL INSERT statements.
Database assignments often meant collecting information from random websites — tables, lists, contact blocks — each formatted differently. Getting that into an insert meant endless manual trimming: stripping junk characters, adding commas and quotes in the right places, and wrapping the lot in a valid statement.
Additional info
Highlights
- Primitive JS UI — paste in, regex clean-up, INSERT out.
- Tried to detect the source and place commas before wrapping the statement.
- Click-and-drag copy workflow; no inspect element needed.
- Saved hours on school DB projects; obsolete and abandoned since sites moved on.
The tool was deliberately simple: one text box for input, one for output, and a Convert button. It ran the pasted selection through a regex pass to strip unneeded junk, tried to recognise what source it came from, and placed commas in sensible spots before wrapping everything in an INSERT you could copy straight from the UI.
It worked remarkably well most of the time, with only small defects — and it saved hours. The best part was the workflow: no inspect element required. Click, hold, drag across what you wanted, copy, paste into the input field, convert, done.
In hindsight, a local script that accepted copied HTML might have been cleaner than selecting from the rendered page — I had not thought of that back then.
Nowadays things are generally easier: web standards are more ubiquitous, and in the worst case you can paste your data into an AI and get an insert statement in a minute. This tool has long since broken as websites changed slightly, and with no need for it anymore I never went back to fix it.