SQL formatter
Format SQL queries with clean indentation and line breaks. Free online SQL formatter for MySQL, PostgreSQL and more.
Runs on our server
Also with the sql beautifier
About this tool
Paste a long one-line SQL query to get it neatly formatted with keywords on their own lines, so joins and conditions are easy to read.
How to use it
- 1 Enter the sQL.
- 2 Select Beautify and copy or download the result.
Questions
Do you store what I enter?
No. Your input is processed to give you the result and isn’t saved.
Is this tool free?
Yes. It’s free to use with no sign-up and no limits for normal use.
More in Code & markup
- HTML minifier Remove comments and collapse whitespace in HTML.
- CSS minifier Remove comments and unnecessary whitespace from CSS.
- JavaScript minifier New Minify JavaScript onto one line with Terser: strips comments and spaces, shortens local names and simplifies code.
- Markdown to HTML Convert Markdown (GitHub-flavoured) to HTML.
- BBCode to HTML Convert forum BBCode ([b], [url], [img]…) to HTML.
- JSON to TypeScript New Generate TypeScript interfaces from a sample JSON object.