SQL Formatter (Oracle-friendly)

Paste messy SQL — get clean, indented, uppercase keywords.
Back to Tools

About this SQL formatter

This formatter tokenizes your SQL and rebuilds it with consistent style: keywords are uppercased, major clauses (SELECT, FROM, WHERE, GROUP BY, ORDER BY, joins) start on their own line, select-list items get one line each, and subqueries are indented. Strings, quoted identifiers and comments are preserved exactly as written.

The keyword list is Oracle-friendly: PL/SQL words like DECLARE, ELSIF, VARCHAR2, SYSDATE, MINUS and CONNECT BY are recognized, and bind variables (:id) pass through untouched. Everything runs client-side — your queries never leave the browser. Related tools: Text Diff Checker and the JSON Formatter & Validator.