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
- 1Paste your SQL into the editor.
- 2Pick the dialect that matches your database.
- 3Choose an indent size and click Format.
- 4Copy or download the result.
Frequently asked questions
Related tools
JSON Formatter
Format, beautify, minify and validate JSON instantly in your browser. Free, private, no upload required.
JSON to YAML
Convert JSON to YAML and YAML back to JSON in your browser. Validates input, shows precise errors, and supports copy and download. Free and private.
CSV to JSON
Convert CSV spreadsheets to JSON arrays in your browser. Supports quoted fields, escaped quotes, custom delimiters, and inconsistent row lengths. Free and private.