SQL Formatter

Format messy SQL into readable format.

Result

Related tools

How it works

  1. 1Paste SQL (minified or messy) into the input area.
  2. 2The tool parses and reformats with proper indentation and line breaks.
  3. 3Keywords like SELECT, FROM, WHERE are placed on separate lines.
  4. 4Invalid SQL may show parse errors.

Example

Input: SELECT * FROM users WHERE id=1
Output: SELECT *
FROM users
WHERE id = 1