Format SQL

Paste your SQL query below

How It Works

  1. Paste your SQL query
  2. Toggle uppercase if needed
  3. Click Format
  4. Copy the result

Features

  • Uppercase SQL keywords
  • Proper clause indentation
  • Subquery support
  • Handles JOINs, WHERE, GROUP BY

Your text is processed entirely inside your browser.

Related Tools

JSON Formatter

Format and validate JSON data with syntax highlighting.

XML Formatter

Format and beautify XML documents with proper indentation.

CSV Viewer

View, sort, and filter CSV data in an interactive table.

Frequently Asked Questions

What SQL dialects are supported?

The formatter supports standard SQL syntax including MySQL, PostgreSQL, SQLite, and SQL Server common keywords and structures.

Does it format subqueries?

Yes. The formatter handles nested subqueries and indents them properly based on their nesting level.

Is my SQL query uploaded to a server?

No. All processing happens entirely in your browser. Your queries never leave your device.

Can I toggle uppercase keywords?

Yes. There is a checkbox to enable or disable uppercase conversion of SQL keywords like SELECT, FROM, WHERE, etc.