# SQL Formatter

> Format and indent SQL queries for MySQL, PostgreSQL, SQLite, SQL Server and BigQuery.

To format SQL, paste your query above and it is re-indented with each clause on its own line. Choose your dialect so that database-specific syntax such as BigQuery backticks or SQL Server brackets is parsed correctly rather than mangled.

**URL:** https://convertto.tech/t/sql-formatter
**Category:** Data & Format Tools (https://convertto.tech/c/data-tools)
**Privacy:** Runs entirely in the browser; no upload
**Cost:** Free, no sign-up
**Last updated:** 2026-08-01

## Key facts

- **Privacy:** Runs entirely in your browser — nothing is uploaded
- **Cost:** Free, unlimited, no sign-up

## How to use

1. Enter or paste your sql.
2. Choose the dialect.
3. Turn "Uppercase keywords" on or off as needed.
4. The result appears immediately — copy or download it.

## FAQ

### Does formatting change how a query runs?

No. The optimiser parses the query into the same plan regardless of whitespace. Formatting is entirely for the person reading it — which matters, because an unreadable query is where subtle join errors hide.

## Related tools

- [Sample SQL Data Generator](https://convertto.tech/t/sample-sql-generator): Generate CREATE TABLE and INSERT statements with realistic seed data for four SQL dialects.
- [SQL IN Clause Builder](https://convertto.tech/t/sql-in-clause-builder): Turn a pasted column of values into a safely quoted SQL IN clause, batched if needed.
- [JavaScript & TypeScript Formatter](https://convertto.tech/t/javascript-formatter): Format JavaScript, TypeScript, JSX and TSX properly with Prettier.
- [JSON Formatter & Validator](https://convertto.tech/t/json-formatter): Format, validate, repair and analyse JSON — with errors that point at the exact line.
- [Excel to SQL Converter](https://convertto.tech/t/excel-to-sql): Generate CREATE TABLE and INSERT statements from a sheet.
- [Wrap Lines in Quotes or Brackets](https://convertto.tech/t/line-wrapper): Add a prefix and suffix to every line and join them — build SQL IN lists, arrays and CSV rows.
- [Mock Data Generator](https://convertto.tech/t/mock-data-generator): Generate realistic fake test data in 14 formats from 100+ field types, with reproducible seeds.
- [CSS, SCSS & Less Formatter](https://convertto.tech/t/css-formatter): Format stylesheets with consistent indentation, spacing and property ordering.
