1. Home
  2. Developer tools
  3. SQL Formatter

SQL Formatter

Turn one-line queries into readable SQL with consistent indentation and keyword case.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use SQL Formatter

  1. Paste your query.
  2. Pick dialect, keyword case and indentation.
  3. Copy the formatted SQL.

Features

  • Many dialects
  • Keyword case
  • Indentation
  • Several statements at once

Supported formats

You can open

  • SQL

You get

  • SQL

Private by design

Your files are opened and processed by your browser on this device. They are never uploaded to openWorkstand or anyone else, so the SQL Formatter is safe for contracts, IDs, photos and work documents, and it keeps working offline once the page has loaded. How local processing works

When to use the SQL Formatter

  • Make long queries readable.
  • Format SQL for a code review.
  • Clean up generated SQL.

Examples

Make a one-line query readable

With the PostgreSQL dialect, uppercase keywords and 2-space indentation:

Input
select id, name, email from customers where country = 'DE' and created_at >= '2026-01-01' order by created_at desc limit 50;
Result
SELECT
  id,
  name,
  email
FROM
  customers
WHERE
  country = 'DE'
  AND created_at >= '2026-01-01'
ORDER BY
  created_at DESC
LIMIT
  50;

Troubleshooting

It says it could not format the query

Pick the dialect your database uses: placeholders, quoting and some keywords differ (for example backticks in MySQL or square brackets in SQL Server). The formatter does not run or validate the query.

The file does not open

Check that it is one of the supported formats above and opens in another app. Damaged files and password-protected PDFs cannot be read until they are repaired or unlocked.

It is slow or stops on a very large file

Everything runs on your device, so speed depends on its memory. Close other tabs, use a computer rather than a phone, or split the file into smaller parts first.

The download did not start

Look for your browser’s download bar or icon. Some browsers ask once before a site may download files; allow it and click the button again.

Frequently asked questions

Is my data uploaded anywhere?

No. This tool runs entirely in your browser. Nothing you type or open is sent to a server, so it is safe for private and work data, and it keeps working offline once the page has loaded.

Step-by-step guides

Keep working with the result

After you download, choose “Save to Workstand” to keep the result in a folder on your computer, attach it to a project and create a follow-up task. It is saved by your browser, not uploaded.