More in this category

SQL Formatter

Format and beautify SQL in your browser. Choose PostgreSQL, MySQL, SQLite, BigQuery, T-SQL and more, pick indentation, then copy or download.

All processing happens locally in your browser. Files are never uploaded.

Introduction

SQL Formatter turns cramped, hard-to-read SQL into clean, consistently indented statements. It supports several popular dialects including PostgreSQL, MySQL, MariaDB, SQLite, BigQuery, T-SQL and PL/SQL, and lets you choose 2, 4 or 8 space indentation. Formatting runs entirely in your browser.

Features

  • Supports 8 popular SQL dialects
  • Choose 2, 4 or 8 space indentation
  • Pretty-prints SELECT, JOIN, WHERE and more
  • Copy or download the formatted SQL
  • Fully local processing, no uploads

How to use

  1. 1Paste your SQL into the editor.
  2. 2Pick the dialect that matches your database.
  3. 3Choose an indent size and click Format.
  4. 4Copy or download the result.

Frequently asked questions

Related tools