CodeNeat
JSON FormatterBase64 Encode/DecodeURL Encode/DecodeRegex TesterDiff CheckerJWT DecoderSQL FormatterHash GeneratorAll Tools
CodeNeat

Clean Up Your Code

Tools

  • JSON Formatter
  • Base64 Encode/Decode
  • URL Encode/Decode
  • Regex Tester

All Tools

  • Diff Checker
  • JWT Decoder
  • SQL Formatter
  • Hash Generator

Product

  • Pro
  • GitHub
  • Privacy Policy
  • Terms of Service
© 2026 CodeNeat. All rights reserved.
Home/SQL Formatter

SQL Formatter

Format and beautify SQL queries. Supports MySQL, PostgreSQL, SQLite, and more.

Your data never leaves your browserCtrl + Enter to run

Frequently Asked Questions

What SQL dialects are supported?

We support Standard SQL, MySQL, PostgreSQL, SQLite, SQL Server (T-SQL), PL/SQL, and MariaDB. Select your dialect from the dropdown for optimal formatting.

Does the formatter change my query logic?

No. The formatter only changes whitespace, indentation, and keyword casing. Your query logic, table names, and values remain exactly the same.

Can I minify SQL queries?

Yes. Use the Minify button to compress your SQL into a single line by removing unnecessary whitespace and comments. This is useful for embedding SQL in application code.

Can I customize keyword casing?

Yes. Choose between UPPER (SELECT, FROM), lower (select, from), or Preserve (keep original casing) using the keyword case dropdown. UPPER is the most common SQL convention.

Does the formatter handle complex queries?

Yes. The formatter handles subqueries, CTEs (WITH clauses), JOINs, UNION, window functions, and other advanced SQL features. It properly indents nested structures for readability.

Related Tools

JSON Formatter & Viewer

Format & validate JSON

Diff Checker

Compare text differences

Regex Tester

Test & debug regex