3 Free Online Database Tools
These 3 tools handle the SQL chores that sit between an editor and a database client. SQL Formatter / Beautifier takes a query that arrived as one unreadable line — out of a slow-query log, an ORM, or a bug report — and lays it out with clauses on their own lines and subqueries indented inside their parentheses, or minifies it back onto one line for a config file or connection string. It reads the dialect from the markers in your SQL and works for MySQL, PostgreSQL, SQLite, SQL Server, and Oracle. SQL Schema Diff compares two CREATE TABLE definitions column by column — which columns exist on only one side, which changed type, nullability, or default, which constraints and indexes are missing — and writes the ALTER statements that bring one schema in line with the other, in the correct per-dialect syntax. Both run entirely in your browser, so a schema or a query carrying table names and business logic never leaves your machine.
All 3 Database tools
What you can do with these database tools
Two jobs that come up whenever you are reading unfamiliar SQL or reconciling two environments.
- Format SQL — turn a one-line query into readable, indented SQL with clause-per-line layout, configurable keyword case, and syntax highlighting in both panes.
- Minify SQL — squeeze a statement back onto a single line for a config value or a connection string, keeping optimizer hints and version-gated comments intact.
- Detect the dialect — automatic detection for MySQL, PostgreSQL, SQLite, SQL Server, and Oracle, shown beside the result so you can overrule it.
- Diff two schemas — compare two CREATE TABLE definitions and see every column, type, nullability, default, constraint, and index that differs.
- Generate migrations — emit the ALTER statements to sync either side, with MySQL MODIFY COLUMN, PostgreSQL ALTER COLUMN … TYPE, Oracle MODIFY, and SQL Server ALTER COLUMN syntax.
A formatter and a diff are not a validator or a migration runner
Both tools describe the shape of your SQL, not its correctness or its consequences. SQL Formatter will happily lay out a half-written query — output that indents somewhere unexpected usually points straight at a parenthesis or a quote you forgot to close, but it does not check that the statement runs. SQL Schema Diff writes accurate ALTER statements for the structural change it sees, but it cannot know your data, your locking constraints, or your deployment order: on a large MySQL or PostgreSQL table an ALTER can lock or rewrite the whole thing, so check what your version does for that specific change before running it. Treat the generated SQL as a first draft to read, run against a development database first, and never run a generated statement unread.