JSON to SQLAlchemy Model Generator
Sample JSON → declarative models · Mapped annotations · ForeignKey & relationship
No upload, no storage
JSON is processed in memory and never sent to a server.
Share via URL fragment
Share links encode data in the # anchor — never sent to a server.
Remember last edit
Optionally keep your last input locally; clear it with one click.
Why generate SQLAlchemy models from JSON
SQLAlchemy 2.0 declarative
Built on DeclarativeBase with Mapped and mapped_column, not the legacy Column style.
Table names and primary keys
Table names are derived in snake_case, and an integer primary key is added when your sample has no id.
ForeignKey and relationship
Nested objects become one-to-one and object arrays become one-to-many, with both sides matched up through back_populates.
JSON columns where relations do not fit
Scalar arrays, unions, and nesting referenced from several places all land in JSON columns, so the model still runs.
Runs locally — no upload
Generation happens entirely in your browser. Nothing is uploaded or stored.