Inference rulesEmits SQLAlchemy 2.0 declarative models — one table per object, with an id added when none exists; unambiguous nesting becomes ForeignKey and relationship, everything else becomes a JSON column.Runs locally — no fixed size limit (bounded by browser memory)
Sample JSONJSON
Paste or type JSON
Generated schemaSQLAlchemy
Paste or type JSON
JSON → SQLAlchemy model · runs locally · no upload

JSON to SQLAlchemy Model Generator

Sample JSON → declarative models · Mapped annotations · ForeignKey & relationship

🔒Your data is processed locally in the browser — never uploaded, never stored

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.