Got a long one-line SQL query you can’t read? Paste it and get clean, indented SQL in one tap, ready to copy or share. Formatting happens on your phone, so your query is never sent.
What SQL Formatter does
• A SQL beautifier for your phone: each clause on its own line, with sub-queries, CASE and joins indented, so a long query reads at a glance
• Formats for your database: Standard SQL, PostgreSQL, MySQL, SQL Server, SQLite, Oracle, BigQuery, Snowflake and 6 more, or let Auto pick one that formats safely
• Changes only spacing and keyword case; strings, comments, names and placeholders stay exactly as you wrote them
• Pick a style: keywords in UPPER, lower or as written; 2 spaces, 4 spaces or tabs; AND/OR at the start or end of a line
• One line view puts a query on a single line for code, configs or chat
• When a query can’t be formatted, it shows the line and column of the problem and the dialects that can format it
• Paste, open a .sql file or share a query from another app; copy or share the result and find it again in History
Good to know
SQL Formatter formats on your device and works offline; your query is never sent. It does not run queries or connect to a database. Database names are trademarks of their owners; SQL Formatter is not affiliated with them.
Free and paid features
SQL Formatter is free with ads. Formatting, every dialect and style, One line, Copy and Share have no limits, and History shows your last 20 queries. A subscription or a one-time purchase removes the ads, shows your full history and lets you share queries as .sql files.
Download SQL Formatter and read any SQL query at a glance.
SQL Formatter turns a messy one-line query into clean, readable SQL to copy