SQL formatter

Local processing · No uploads

Format or conservatively compact MySQL, PostgreSQL and SQLite SQL.

Formatting only, without a database connection. Strings and comments follow the selected dialect.

Enter content, then choose an action.

Usage & limits

How to use

  1. Fill the labeled inputs and settings or insert an example, which waits for explicit execution.
  2. Choose the primary action and inspect status, result or errors. Cancel and edit when needed.
  3. Explicitly copy or download the complete current result. Execute again after changing input or settings.

Input and output examples

Input and result example
Example input
select a from t where id = 1
Expected output
select
  a
from
  t
where
  id = 1

Everyday tool dependency licenses and sources

Formats and limits

  • MySQL is the default, with PostgreSQL and SQLite selectable. Formatting uses two spaces while preserving keyword/identifier case, parameters, strings and comment contents.
  • Compaction folds only lexically dispensable whitespace. Ordinary/executable comments, hints, line-comment termination and required PostgreSQL adjacent-string newlines remain. Unsupported lexical constructs fail explicitly.
  • Input is limited to 1 MiB UTF-8, output to 8 MiB, with a cancellable 5-second deadline. This processes formatting without a database connection or server-side validity/execution guarantee.

Content is processed in this page, without uploads or site history. First load and on-demand assets need a network. Clear or leave to release tool content; browser-managed restoration is outside the tool’s control.

Browser agent usage

These are interactive browser tools, not HTTP computation APIs. Computation requires JavaScript; initial page and on-demand asset loading need a network.

Input method
Use labeled input, mode and option controls. Keep content, filenames and settings in this page, outside URLs and feedback.
Reading results
Confirm success in the status area before reading current results. TXT/copy provide complete output; the display may be a preview.

Supported operations

  • Explicitly execute or insert an example
  • Cancel, copy, download or clear

Locate inputs and buttons by their page labels. After an explicit action, wait for the status to finish before reading the current result. Fix failed input first; do not reuse old results after changing input or settings.

Common questions

Will it execute SQL?

Formatting runs entirely in the browser without a database connection.

Feedback and suggestions

Leave a problem or suggestion for this tool.

Tool inputs stay local. Only text you explicitly enter in feedback is sent to a separate service and may become public after review. Email stays private to the maintainer.

Account-free feedback is not enabled yet. You can still use GitHub Issues (a GitHub account is required).

GitHub Issues ↗

Content reviewed:

Search tools