SQL Formatter

This tool can be used to quickly format your SQL (Structured Query Language) into a more readable output. More.

This is a client side utility. Your data will NOT leave your own browser.

How it works?

SQL Formatter online: This tool can be used to quickly format your SQL (Structured Query Language) into a more readable output.

  • 2, 3 and 4 Spaces and Tabs: Formats the input using an specified level of indentation.

See the examples of usage below.

Examples

Unformatted SQL
SELECT FIRST_NAME, LAST_NAME, PHONE, ADDRESS FROM CUSTOMER WHERE FIRST_NAME LIKE '%John%' ORDER BY FIRST_NAME
Formatted SQL
    SELECT
        FIRST_NAME,
        LAST_NAME,
        PHONE,
        ADDRESS 
    FROM
        CUSTOMER 
    WHERE
        FIRST_NAME LIKE '%John%' 
    ORDER BY
        FIRST_NAME

Tutorials

How to format SQL

Follow these steps to quickly format your SQL statement.
  1. Enter the SQL input
    • Paste your SQL into the input area.
  2. Select the formatting option
    • Select the desired option and click "Submit".
  3. All done
    • Your formatted SQL is ready. Click the "Copy to Clipboard" button and you should be ready to rock!

More information

Structured Query Language or simply SQL is the default language used for querying and managing the data in a Relational Database Management System (RDBMS).

SQL language is consisted by a Data Definition Language (DDL), which is used to create the structure of the relational databases, and a Data Manipulation Language (DML), which is used to manipulate the data. You can find more information about SQL in the following resources.

This tool does not validate your SQL input. It will just identify specified keywords and do the appropriate formatting.

Additional Resources

Looking for something else?

In case you are looking for something else than this functionality, please let us know by contacting us. The most common requests will be made available (for free) once possible.