Diff two database schemas from your terminal. No signup. No API key. One curl and you get a markdown report + breaking change analysis.
curl -X POST -H "Content-Type: application/json" -d '{ "schemaA": "CREATE TABLE users (id INT PRIMARY KEY);", "schemaB": "CREATE TABLE users (id INT PRIMARY KEY, email VARCHAR(255) NOT NULL);", "dialect": "postgres", "format": "markdown" }' https://schemalens.tech/api/free-diff
The free tier requires no authentication. Just POST your schemas and get a response.
PostgreSQL, MySQL, SQLite, SQL Server, and Oracle migration scripts generated automatically.
Response includes a structured breakingChanges array with severity levels and explanations.
Get a clean markdown diff you can paste into PR descriptions, Slack, or documentation.
| Parameter | Type | Required | Description |
|---|---|---|---|
schemaA | string | Yes | Original CREATE TABLE dump |
schemaB | string | Yes | Modified CREATE TABLE dump |
dialect | string | No | postgres, mysql, sqlite, mssql, oracle (default: postgres) |
format | string | No | markdown or json (default: markdown) |
Pipe a schema file directly into the API:
curl -X POST -H "Content-Type: application/json" -d '{ "schemaA": '"'"'$(cat schema-v1.sql)'"'"', "schemaB": '"'"'$(cat schema-v2.sql)'"'"', "dialect": "mysql" }' https://schemalens.tech/api/free-diff
Save the diff to a file for your CI pipeline:
curl -X POST -H "Content-Type: application/json" -d '{ "schemaA": '"'"'$(cat before.sql)'"'"', "schemaB": '"'"'$(cat after.sql)'"'"', "format": "markdown" }' https://schemalens.tech/api/free-diff -o schema-diff.md
Test the API in your browser with live inputs, dialect selection, and syntax-highlighted output.
Open API Playground → GitHub Action