SQL formatter: make your migration reviewable.

Format PostgreSQL queries, table definitions, RLS policies and PL/pgSQL functions, with basic syntax checks. SQL stays in your browser — free, no sign-up.

Loading the tool…

Basic checks only. No database execution, permission checks or complete PL/pgSQL validation.

How to use

  1. Paste a PostgreSQL query or Supabase migration sample under 200 KB.
  2. Choose Format SQL. The tool checks quotes, comments, delimiters and common incomplete clauses before formatting.
  3. Review and export the result. Validate the migration in your own test database before applying it.

Reference documentation

Frequently asked questions

Is this free, and do I need an account?

It is free, no sign-up. Processing happens in your browser. Tool inputs and results are not sent to a processing API or saved by this tool. Usage analytics record only the tool name and action.

Is this a full PostgreSQL syntax validator?

No. It checks balanced parentheses and brackets, closed strings, comments and dollar quotes, plus common incomplete clauses. It does not resolve tables, types, permissions or PL/pgSQL semantics, and a passed check is not proof that SQL will execute.

Can I format Supabase RLS policies?

Yes. PostgreSQL formatting supports policy definitions and auth.uid() or auth.jwt() expressions. Formatting cannot establish that a policy is secure or detect every recursive policy.

How are PL/pgSQL functions formatted?

The PostgreSQL formatter handles the function definition. A separate local pass reindents procedural statement boundaries inside dollar-quoted PL/pgSQL bodies while preserving tokens. It does not parse or validate the procedural language.

Does the tool execute or upload SQL?

No. It has no database connection and no processing endpoint. The output is text for you to review and use in your own environment.

Are strings, comments and dollar quotes preserved?

Quoted text is kept intact. SQL keywords outside strings are uppercased and whitespace is adjusted. Review function bodies and migration diffs before applying the output.

Related tools

All free tools

Read this page as Markdown