GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Coding-Dev-Tools/json2sql: Convert JSON arrays and objects to SQL INSERT statements from the command line

BranchesTags
Open more actions menu

Latest commit

 

History

113 Commits
113 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
src/json2sql
src/json2sql
 
 
tests
tests
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
AGENTS.md
AGENTS.md
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
cli.js
cli.js
 
 
conftest.py
conftest.py
 
 
eslint.config.mjs
eslint.config.mjs
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
pyproject.toml
pyproject.toml
 
 

Repository files navigation

json2sql

GitHub stars

Convert JSON files and datasets to SQL INSERT statements. Supports nested JSON, PostgreSQL, MySQL, and SQLite output dialects.

⭐ Star this repo if you work with JSON data — it helps other devs discover json2sql!

GitHub release Python License: MIT |Open Source Alternative |CI

Real-world scenarios:

  • Seeding test databases: Convert API response fixtures into seed data for integration tests
  • Data migrations: Transform JSON exports from one system into INSERT statements for a new database
  • CI/CD pipelines: Generate SQL from JSON configs as part of automated deployment
  • Analytics imports: Convert event JSON payloads into structured SQL tables for querying

Installation

Note: json2sql is not yet on public PyPI. Install via GitHub directly:

pip install git+https://github.com/Coding-Dev-Tools/json2sql.git

Or install via Homebrew (macOS/Linux):

brew tap Coding-Dev-Tools/tap
brew install json2sql-cli

Or install via Scoop (Windows):

scoop bucket add Coding-Dev-Tools https://github.com/Coding-Dev-Tools/scoop-bucket
scoop install json2sql-cli

npm (Node.js wrapper):

npm install -g json2sql

Then run: json2sql --help

Quick Start

# Basic usage — converts JSON to SQL INSERT statements
json2sql convert data.json

# Specify output dialect
json2sql convert data.json --dialect postgres
json2sql convert data.json --dialect mysql
json2sql convert data.json --dialect sqlite

# Specify output file
json2sql convert data.json -o output.sql

# Specify table name
json2sql convert data.json --table users

# Handle nested JSON (auto-flattens into relational tables)
json2sql convert nested_data.json --flatten

Features

  • Nested JSON support: Automatically flattens nested objects into separate relational tables
  • Multi-dialect output: PostgreSQL, MySQL, SQLite INSERT syntax
  • Array of objects: Handles JSON arrays as multiple INSERT rows
  • Type inference: Auto-detects strings, numbers, booleans, nulls
  • Pipe support: Read from stdin for pipeline usage
  • Zero dependencies: Only Python 3.10+ required (typer for CLI)

CI/CD Integration

# Generate SQL as part of a data pipeline
cat data.json | json2sql convert --dialect postgres --table events > events.sql

# Use in GitHub Actions to prepare test data
json2sql convert fixtures.json --dialect sqlite -o seed.sql
sqlite3 test.db < seed.sql

Pricing

json2sql is one of eleven CLI tools in the Revenue Holdings suite. One license covers all CLI tools.

Plan Price Best For
Free $0 Individual devs, OSS — CLI only, limited rows
json2sql Individual $9/mo ($7 billed annually) Professional devs — unlimited rows, batch processing
Suite (all 11 CLI tools) $49/mo ($39 billed annually) Full Revenue Holdings toolkit — 40% savings
Team $79/mo ($63 billed annually) Up to 5 devs — API access, CI/CD integration, priority support
Enterprise Custom SSO, RBAC, compliance reports, dedicated support

🔹 No lock-in: CLI works fully offline on the free tier — no telemetry, no phone-home. 🔹 Annual billing: Save 20%.

Per-Tier Features

Feature Free json2sql Suite Team Enterprise
CLI: convert, pipe ✓ ✓ ✓ ✓ ✓
Unlimited rows per conversion — ✓ ✓ ✓ ✓
Batch processing — ✓ ✓ ✓ ✓
Schema generation — ✓ ✓ ✓ ✓
API access — — — ✓ ✓
Compliance reports — — — — ✓
RBAC — — — — ✓
SSO / SAML / OIDC — — — — ✓
Priority support Community 24h 24h 8h Dedicated

Part of Revenue Holdings — CLI tools built by autonomous AI.

License

MIT

About

Convert JSON arrays and objects to SQL INSERT statements from the command line

coding-dev-tools.github.io/devforge/

Topics

clidata-migrationdata-pipelinedatabase-toolsdeveloper-toolsdevforgeetljsonmcpmcp-servermodel-context-protocolmysqlpostgresqlsqlsqlite

Resources

Readme
MIT license

Contributing

Contributing

Security policy

Security policy
Activity

Stars

2 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.