Developer's Toolbox / Format SQL online

SQL formatter

SQL formatter tool allows to format and beautify SQL statements online.

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.


Your SQL statement

Choice a database




Formatted SQL statement




User guide

This tool is an easy to use SQL formatter, 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:

  • Copy and paste your SQL query.
  • Drag and drop your SQL file.
  • Directly type your SQL string in the editor.

By default, it format for Standard SQL, but you can also choice a database.

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".

SQL keywords appear in green all-uppercase.


SQL pretty tool

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 is a beta version, you can neither choice the indentation level nor modify the case of the SQL keywords.


About SQL

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.


About SQL Formatter library

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.



You can report a bug or give feedback by adding a comment (above) or by clicking "Contact us" link (at the top right hand corner of the page).

Comments





The tools are provided "as is", without warranty of any kind, either express or implied.