JA Technology Solutions
SQL Formatter
Pretty-print SQL queries with proper indentation and keyword uppercasing. Supports common SQL dialects.
SQL Formatter
Pretty-print SQL queries with proper indentation and keyword uppercasing. Paste a messy one-liner from a log file, ORM debug output, or production query plan and get clean, readable SQL. Consistent formatting makes queries easier to review, debug, and compare across team members. Works with SELECT, INSERT, UPDATE, CREATE, and other common statement types.
Learn more ↓
Loading interactive explorer...
Readable SQL Is Maintainable SQL
Complex SQL — the kind with five joins, nested subqueries, window functions, and a WHERE clause that spans a dozen conditions — becomes nearly impossible to reason about when it is written on one long line or indented inconsistently. Pretty-printing makes the query structure visible: each clause (SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY) on its own line, joins aligned, conditions indented under AND/OR keywords, and subqueries nested visually. Once the structure is visible, logic bugs and performance bottlenecks become obvious — a missing join condition, a WHERE filter that should be in the ON clause of a LEFT JOIN, a redundant DISTINCT that masks a cartesian product.
Dialects and Edge Cases
This formatter handles standard SQL and most of the common dialects — PostgreSQL, MySQL, SQL Server T-SQL, Oracle PL/SQL, DB2, SQLite — including CTEs (WITH), window functions (OVER), MERGE statements, INSERT…ON CONFLICT, and the various quoting conventions. Keywords are uppercased for contrast against identifiers. Comments and string literals are preserved exactly. This is safe for pasting queries straight out of production logs, an IDE query history, or a minified ORM emission.
Database Work Beyond Formatting
Pretty-printing is step one. The harder problems — query optimization, index design, schema refactoring, stored-procedure modernization, and migrating between database platforms — are where I spend most of my database time. I work across DB2 (on IBM i and z/OS), SQL Server, PostgreSQL, MySQL/MariaDB, and Oracle, on projects ranging from single-query performance fixes to full schema migrations. See database development services, explore custom reporting, or get in touch to discuss your database work.
All tools run entirely in your browser. Your data never leaves your machine. Need help? Ask James.