🧰Locly

Format SQL Online

Format SQL with indentation and keyword casing

About This Tool

SQL Formatter beautifies SQL for readability with indentation and optional uppercase keywords. It does not connect to a database and never executes queries. Formatting is processed locally in your browser β€” your SQL never leaves your device.

How to Use

  1. Paste your SQL into the input box
  2. Toggle uppercase keywords if desired
  3. Click Format
  4. Copy the formatted result
  5. Clear to format another statement

Common Use Cases

  • Reviews: Make messy queries readable before code review
  • Docs: Pretty-print examples for READMEs
  • Debug: Spot missing commas and clauses faster
  • Teaching: Show clean SQL to students
  • Offline: Format without pasting into online DB tools

FAQ

Q1: Does this run my SQL?

No. It only formats text. No database connection is made.

Q2: Is my SQL uploaded?

No. Formatting is processed locally in your browser.

Q3: What if input is empty?

You will see a validation message β€” paste SQL before formatting.

Q4: Can I change keyword case?

Yes β€” enable Uppercase keywords for SELECT/FROM-style casing.

Related Tools