A one-line query
select id, name from users where active = 1 and country = 'NO' order by nameSELECT
id,
name
FROM
users
WHERE
active = 1
AND country = 'NO'
ORDER BY
nameTurn long, single-line SQL into readable queries with each clause on its own line, consistent indentation and upper- or lower-case keywords. Supports the major SQL dialects and multiple statements at once — handy for code reviews, documentation and debugging.
select id, name from users where active = 1 and country = 'NO' order by nameSELECT
id,
name
FROM
users
WHERE
active = 1
AND country = 'NO'
ORDER BY
nameChoose “lower” if your team’s style guide prefers select … from … where; identifiers and string values are never changed.
Formatting is done by the open-source sql-formatter library, which understands each dialect’s syntax. It only changes whitespace and, if you choose, the case of SQL keywords — table names, column names and values in quotes are left untouched, so the formatted query behaves exactly like the original.
No. Your queries are formatted in your browser, so table names, data and credentials in them stay on your device.
Pick the database the query runs on. Standard SQL works for most simple queries; dialect-specific features like MySQL backticks, PostgreSQL :: casts or SQL Server [brackets] need the matching dialect.
It reports syntax it can’t understand, but it doesn’t know your tables or columns, so a nicely formatted query can still fail when run. Use your database to validate queries.
Yes. Separate statements with semicolons and each one is formatted, with a blank line between them.
Everything you need. One simple place.
Free, fast online tools for text, PDFs, images, data and everyday maths. Every tool runs entirely in your browser, so your files stay on your device.
© 2026 Toolora. All rights reserved.
Built for speed and privacy