Online Free SQL Query Formatter (Prettifier) Tool


If you find the SQL Formatter tool helpful, please Bookmark it by pressing Windows (Command ⌘ on Mac) + D

Enter Unformatted SQL Query:



Formatted SQL:


A very simple and easy-to-use SQL Queries prettifier tool. Works with all kinds of queries including.

SELECT INSERT UPDATE
DELETE CREATE ALTER
JOIN HAVING SET
UNION AND OR
ORDER BY GROUP BY LIMIT
DISTINCT CASE WHEN
ELSE END EXISTS
NOT EXISTS IN NOT IN
LIKE NOT LIKE BETWEEN
NOT BETWEEN IS NULL IS NOT NULL
AS INNER JOIN LEFT JOIN
RIGHT JOIN FULL OUTER JOIN CROSS JOIN
NATURAL JOIN INNER JOIN ON LEFT JOIN ON
RIGHT JOIN ON FULL OUTER JOIN ON CROSS JOIN ON
EXISTS (subquery) NOT EXISTS (subquery) IN (subquery)
NOT IN (subquery) LIKE (pattern matching) NOT LIKE (pattern matching)
BETWEEN (range) NOT BETWEEN (range) IS NULL (null check)
IS NOT NULL (null check) AS (aliasing) DISTINCT (unique values)
COUNT (aggregation) SUM (aggregation) AVG (aggregation)
MAX (aggregation) MIN (aggregation) GROUP BY (grouping)
HAVING (filtering aggregated results) ORDER BY (sorting) LIMIT (result limiting)
OFFSET (result offset)


This tool is based on JavaScript and formatting happens in the browser and no data is sent to the server making it secure.

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap