_noob.tools
My IP

SQL Formatter & Beautifier

Indent and colorize destructive database queries locally before execution to prevent critical data loss.

Raw Query String

Compiled Output

Output will appear here...

What is the SQL Query Formatter?

Paste in a messy, single-line SQL query and this tool reflows it into indented, readable blocks — entirely inside your browser tab, so the query text never leaves your machine.

How it works

It's pattern matching, not a real SQL parser: a set of regular expressions collapses the query to one line, uppercases recognized keywords like SELECT, JOIN, and WHERE, then inserts a line break and indentation before each keyword and after every comma.

SysAdmin & security use cases

  • Cleaning up a single-line query copied from a slow query log before sharing it with a teammate.
  • Making a machine-generated query from an ORM (Prisma, Entity Framework) readable while debugging.
  • Double-checking the WHERE clause on a DELETE or UPDATE statement before running it against production.
  • Formatting a query for a pull request description or internal documentation.