SQL formatter tool allows to format and beautify SQL statements online. It is also a SQL minifier, you can minify SQL.
It is a instant SQL formatter, it will automatically format your SQL query in order to generate SQL pretty string.
Short user guide:
Copy and paste, drag and drop a SQL query or directly type in the "Your SQL statement" editor below.
Your SQL query is automatically formatted in the "Formatted SQL statement" editor.
You can see the user guide to help you to use this online SQL editor.
This tool is an easy to use SQL formatter, you can easily format SQL online.
There is only one step to format your SQL query, you must fill the "Your SQL statement" editor,
and automatically the SQL pretty is available in the "Formatted SQL statement" editor.
In order to fill the "Your SQL statement" editor, you can:
You have several formatting options available:
By default, it formats for Standard SQL, but you can also choice a database in order to correctly format the specificities.
You can choice the case of SQL keywords (as SELECT, FROM ...).
You can choice the indentation: You can choose the character (between tabulation and space characters) to use and the number of times to repeat it.
You can choice to keep or remove comments.
You can format your SQL to one line.
Note: Single line comments (start with --) will be convert to multi-line comments (start with /* and end with */).
Just select the "Yes (Minify)" option of the "compact mode" parameter to minify your SQL.
You can click on "Download" button in order to download the formatted SQL statement.
You can also copy the result to the clipboard by clicking on the button "Copy to clipboard".
Note: SQL keywords appear in green all-uppercase.
When you debug a large automatically generated query, it is often not easy to understand. SQL pretty tool makes the queries more understandable. This online SQL editor tool allows you easily to read SQL statement! This SQL beautifier is useful for SELECT, UPDATE, INSERT and DELETE statements.
Your SQL query is formatted even if your SQL statement is invalid. This tool does not validate the syntax of your queries. If you need to check the syntax of SQL queries, you can visit our SQL validator.
You can choose the indentation level, the case of the SQL keywords, the database, whether you keep or remove comments and the compact mode.
This tool also allows to minify SQL (compress).
SQL (Structured Query Language) is a domain-specific language used in programming for managing relational database. It allows to handle structured data where there are relations between different entities of the data.
SQL is a standard of ANSI and ISO.
SQL-Formatter.js is a JavaScript library for pretty-printing SQL queries. It can be used like any javascript library in a browser. It is MIT licensed.
I made some changes to add some settings. You can retrieve the updated version from the url: https://extendsclass.com/lib/sql-formatter.js Look for "// UPDATED" to find the changes.
Comments
Peter Lyden-2020-02-21 21:35
when I use the'copy text from picture' when right clicking on the image and paste into your sql formatter or another one it doesn't seem to
copy the text correctly as some of the special characters are being converted to something else ? Any ideas why?
Thanks - can be reached @peterlyd@buffalo.edu
Nandakumar Kamat-2022-03-14 13:18