{"id":31364446,"url":"https://github.com/snakewa/html5-sql-insert-tools","last_synced_at":"2026-04-18T01:31:20.590Z","repository":{"id":313868663,"uuid":"1053212624","full_name":"snakewa/html5-sql-insert-tools","owner":"snakewa","description":"Convert SQL INSERTs to JSON \u0026 HTML tables in the browser. Schema-aware, i18n, dark mode, downloads, Pages friendly.","archived":false,"fork":false,"pushed_at":"2025-09-09T08:32:28.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-09T09:16:59.604Z","etag":null,"topics":["bootstrap","client-side","github-pages","html-table","i18n","javascript","json","sql","sql-insert","sql-parser"],"latest_commit_sha":null,"homepage":"https://snakewa.github.io/html5-sql-insert-tools/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snakewa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-09T06:25:31.000Z","updated_at":"2025-09-09T08:32:32.000Z","dependencies_parsed_at":"2025-09-09T09:19:01.549Z","dependency_job_id":"fe8c0612-b5ae-419a-bcae-acf37f274312","html_url":"https://github.com/snakewa/html5-sql-insert-tools","commit_stats":null,"previous_names":["snakewa/html5-sql-insert-tools"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/snakewa/html5-sql-insert-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snakewa%2Fhtml5-sql-insert-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snakewa%2Fhtml5-sql-insert-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snakewa%2Fhtml5-sql-insert-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snakewa%2Fhtml5-sql-insert-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snakewa","download_url":"https://codeload.github.com/snakewa/html5-sql-insert-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snakewa%2Fhtml5-sql-insert-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31953509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"ssl_error","status_checked_at":"2026-04-18T00:39:20.671Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","client-side","github-pages","html-table","i18n","javascript","json","sql","sql-insert","sql-parser"],"created_at":"2025-09-27T07:11:16.126Z","updated_at":"2026-04-18T01:31:20.582Z","avatar_url":"https://github.com/snakewa.png","language":"JavaScript","readme":"# SQL INSERT ➜ JSON + HTML Table\n\nEnglish | [中文说明](README.zh.md)\n\nFree online SQL to JSON/Table converter – paste SQL, get JSON or HTML instantly.\n\nA lightweight web tool to convert SQL INSERT statements into JSON and a rendered HTML table. Supports multiple statements, schema inference from CREATE TABLE, inline validation, JSON previews, downloads, and more.\n\nNote: This is a 100% client-side web app (pure HTML/JS). It requires no backend and works perfectly on GitHub Pages.\n\n[![GitHub Pages](https://img.shields.io/badge/Deploy-GitHub%20Pages-2ea44f?logo=github)](https://snakewa.github.io/html5-sql-insert-tools/)\n![Static](https://img.shields.io/badge/Client--side-Static-blue)\n![Language](https://img.shields.io/badge/i18n-EN%2FZH-informational)\n![Theme](https://img.shields.io/badge/Theme-Light%20%7C%20Dark%20%7C%20System-7952B3)\n![License](https://img.shields.io/badge/License-MIT-green)\n![Last Commit](https://img.shields.io/github/last-commit/snakewa/html5-sql-insert-tools)\n\n## Live Demo\n![SQL to JSON/Table Converter screenshot](./screenshot.jpg)\n- URL: https://snakewa.github.io/html5-sql-insert-tools/\n\n## Why \n\n- Zero setup: paste SQL, convert directly in the browser. No DB server required.\n- Multiple outputs: JSON for APIs, HTML tables for reports/dashboards.\n- Easy updates: generate UPDATE statements from selected rows for quick fixes.\n- Education-friendly: visualize how SQL maps to JSON/HTML.\n- Offline-ready: pure HTML5/JavaScript, runs anywhere, ideal for GitHub Pages.\n\n## Support (Buy Me a Coffee)\n\nHi! I built this free tool to quickly turn SQL into JSON or HTML tables. If it saved you time, consider buying me a coffee—your support helps me improve and add features!\n\n\u003ca href=\"https://www.buymeacoffee.com/snakewa\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" height=\"48\" width=\"173\"\u003e\n  \u003c/a\u003e\n\n## Features\n\n- Robust parsing of `INSERT INTO ... VALUES (...), (...);` across multiple tables\n- Optional column list: supports `INSERT INTO table VALUES (...)` and infers columns\n- Schema-aware: extracts column names from `CREATE TABLE` blocks when present\n- Type normalization: numbers, booleans, `NULL`, quoted strings\n- Multiple outputs: JSON (grouped by table or flat array) and HTML tables\n- Inline messages: errors and warnings shown in-page\n- Row-level mismatch indicators when values count ≠ columns count\n- JSON cell handling:\n  - Detects JSON-like strings and renders preview or expanded view\n  - Click “View” to open a modal with pretty-printed JSON\n  - Toggle to expand JSON values by default\n- Copy/Download:\n  - Copy JSON to clipboard\n  - Download JSON (grouped/flat to match current mode)\n  - Download CSV (always flat, includes `__table` column)\n\n## Getting Started\n\n1. Open `index.html` in your browser (no build step required).\n2. Paste SQL in the textarea. You can include `CREATE TABLE` statements and multiple `INSERT` statements.\n3. Click `Convert`.\n4. Use the Output selector to switch between Grouped and Flat JSON.\n5. Copy/Download results or inspect the HTML tables.\n\n## Example\n\n```sql\nCREATE TABLE products (\n  id INT PRIMARY KEY,\n  name TEXT,\n  price DECIMAL(10,2),\n  stock INT\n);\n\nINSERT INTO products VALUES\n  (1, 'Laptop', 999.99, 5),\n  (2, 'Mouse', 24.99, 10);\n```\n\nProduces grouped JSON:\n```json\n{\n  \"products\": [\n    { \"id\": 1, \"name\": \"Laptop\", \"price\": 999.99, \"stock\": 5 },\n    { \"id\": 2, \"name\": \"Mouse\",  \"price\": 24.99,  \"stock\": 10 }\n  ]\n}\n```\n\n## UI Controls\n\n- Convert button: parse and render\n- Output: `Grouped by Table` or `Flat Array`\n- Expand JSON values: when on, JSON-like cell strings render expanded inline\n- Copy JSON: copies current JSON view (grouped or flat) to clipboard\n- Download JSON: downloads current JSON view\n- Download CSV: downloads a flat CSV (includes `__table` column)\n\n## Validation\n\n- If the number of values in a tuple does not match the number of columns:\n  - A warning is shown inline\n  - Missing values are set to `null`\n  - Extra values are ignored\n  - The affected table row is marked with a `mismatch` badge\n\n## Notes \u0026 Limitations\n\n- Supported now:\n  - `INSERT INTO ... (cols) VALUES (...), (...);`\n  - `INSERT INTO ... VALUES (...), (...);` (columns inferred or from schema)\n  - `CREATE TABLE` simple column lists (+ skipping constraints)\n- Not supported yet: `INSERT ... SELECT`, `ON CONFLICT/RETURNING`, complex vendor-specific syntax, deep type parsing in `CREATE TABLE`.\n- JSON-like detection is best-effort on strings that look like `{...}` or `[...]` and parse via `JSON.parse`.\n\n## Development\n\n- All logic is in `script.js`; UI is in `index.html`.\n- No external build tools required. Bootstrap CDN is used for styling.\n\n## Offline Usage (Download ZIP)\n\nUse the app locally without any server:\n\n1. Go to the repository page: https://github.com/snakewa/html5-sql-insert-tools\n2. Click the green \"Code\" button → \"Download ZIP\".\n3. Extract the ZIP to a folder on your computer.\n4. Open the extracted folder and double‑click `index.html` to launch in your browser.\n5. Paste your SQL and click Convert.\n\n## License\n\nMIT\n","funding_links":["https://www.buymeacoffee.com/snakewa"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnakewa%2Fhtml5-sql-insert-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnakewa%2Fhtml5-sql-insert-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnakewa%2Fhtml5-sql-insert-tools/lists"}