Skip to content
Developer & CodeLocal · Stays on device

SQL Formatter

Beautify SQL queries with consistent indentation and keyword case for 16 database dialects.

Launch SQL Formatter
  • Standard SQL, PostgreSQL, MySQL, SQLite
  • Free to use
  • No sign-up or watermark
sql-formatterOn this device
1
2
3
4
5
6
7
8
9
10
1
2
3
4
5
6
7
8
9
10
Standard SQLPostgreSQLMySQL
Open SQL Formatter

Not yet professionally reviewed. This tool’s formulas and wording have not been checked by a qualified professional. Use the results as an estimate and verify anything important.

Formatting only changes layout; it doesn't validate, optimise or secure a query. Review queries yourself, and use parameterised queries rather than pasting user input into SQL.

About this tool

Formats one or many SQL statements using the open-source sql-formatter library, which understands the syntax of PostgreSQL, MySQL, SQL Server, Oracle, BigQuery, Snowflake and other dialects. Choose upper, lower or preserved keyword case and your indentation. The formatter loads only when you open this tool.

Everything runs in your browser. Your data is never uploaded, logged or stored.

  1. Input

    Your code or text

    Standard SQL, PostgreSQL, MySQL, SQLite, T-SQL

  2. Processing

    Processed in this browser

    In-browser. Nothing is uploaded.

  3. Output

    Your result

    Ready to download or copy

Local processing pipelinesql-formatter

How to use it

  1. 1

    Pick your database dialect.

  2. 2

    Paste the SQL.

  3. 3

    Adjust keyword case and indentation, then copy the result.

Zero-upload architecture

How to use SQL Formatter for free, with no upload

Free, with no sign-up or watermark · Your files stay on your device

  1. 1

    Open SQL Formatter

    Launch the app and add your file. There is nothing to install and no account to create.

  2. 2

    Work through it

    Paste the SQL.

  3. 3

    Get your result

    Adjust keyword case and indentation, then copy the result.

  • Local

    JSON Formatter

    Pretty-print, beautify and validate JSON with precise error locations, key sorting and custom indentation.

    Open tool
  • Local

    YAML to JSON Converter

    Convert YAML to JSON and JSON to YAML, including multi-document YAML files.

    Open tool
  • Local

    CSV Viewer

    Open large CSV and TSV files as a sortable, searchable table without Excel.

    Open tool
  • Local

    SQL Insert Generator

    Turn CSV or JSON into INSERT statements, or a CREATE TABLE with inferred column types, for PostgreSQL, MySQL, SQLite or SQL Server.

    Open tool