Paste your SQL to format, indent, and beautify it instantly.
Format SQL via our free API:
# Format SQL
curl -X POST https://ai.doxx.lat/api/text/format \
-H "Content-Type: application/json" \
-d '{"text":"SELECT * FROM users WHERE id=1","language":"sql"}'
No API key required. CORS enabled. Unlimited requests.
SQL formatting makes complex queries readable by adding indentation and line breaks around keywords like SELECT, FROM, JOIN, WHERE, GROUP BY, ORDER BY, and HAVING. This tool handles nested subqueries, multiple JOINs, and common SQL dialects including MySQL, PostgreSQL, and SQLite.