# SQL formatter — beautify queries, no upload

> Format and beautify SQL queries in your browser: consistent keywords, indentation, and line breaks for readable queries. Nothing is uploaded.

Beautify SQL with consistent keyword casing, indentation, and line breaks so complex queries become readable. Formatting runs in the browser and your SQL isn't uploaded.

A long query crammed onto few lines is hard to review and easy to get wrong. Formatting aligns clauses and joins so the structure of the query is obvious, which makes bugs and missing conditions easier to spot.

To actually run SQL against a CSV, use the Data Zone SQL tool (DuckDB in the browser); for other languages, use the code formatter.

## How to

1. **Paste SQL.** Paste the query you want to tidy up.
2. **Format.** Keywords, clauses, and joins are laid out consistently.
3. **Copy.** Copy the formatted query back into your editor.

## FAQ

### Does it work with any SQL dialect?

It formats standard SQL structure — SELECT, JOIN, WHERE, CTEs — which covers most dialects; vendor-specific syntax is preserved even if not specially styled.

### Will it change my query's behavior?

No. Formatting only changes whitespace and casing for readability; the query logic is untouched.

### Is my SQL uploaded?

No. It's formatted in the browser, so queries — which can reveal schema details — stay local.


## Related tools

- [SQL query](https://www.safepaper.app/data/sql-query)
- [Format & minify](https://www.safepaper.app/dev/code-formatter)
- [JSON toolkit](https://www.safepaper.app/dev/json-toolkit)
- [Text diff](https://www.safepaper.app/dev/text-diff)

---

Canonical HTML: https://www.safepaper.app/dev/sql-formatter
Markdown: https://www.safepaper.app/dev/sql-formatter.md

There is no upload endpoint — your files are processed in this browser tab. Open your network tab and check.
