opyeb sqllint

No upload, no server

Paste SQL,
let the browser format and review it

Paste a statement and it is laid out again for PostgreSQL, MySQL or SQLite, while unbalanced brackets and quotes, SELECT *, UPDATE or DELETE without WHERE, a leading wildcard and functions wrapped around a column are reported with line numbers. CREATE TABLE becomes a column, type, NULL, default, PK, FK and index summary. Zero input sent to a server (advertising and affiliate widgets excepted).

Paste SQL to tidy. Results update as you type.

Format options

Input

—

Several statements are fine. Up to 256 KB is processed, and comments and string literals are preserved.

Result

The download name follows the active tab: query.sql, query.min.sql, sqllint-report.md or sqllint-report.json.

DDL summary

—

No CREATE TABLE statement yet. Paste DDL to get columns, keys and indexes as a table.

How to read it

  • The formatter never reorders tokens, it only re-lays-out whitespace.
  • Fix any statement marked as an error before running it. Warnings are advice about indexes and safety.
  • In the DDL summary the key column stands for PK, FK, UQ and CK.

Everything is computed in this browser. Input is never sent to a server.

How it works

  1. 01Paste the SQL

    Drop in the statement you want to tidy, or pick one of six synthetic presets. Nothing you paste is sent anywhere.

  2. 02Choose a dialect and options

    Pick PostgreSQL, MySQL or SQLite, then set keyword case, indentation and comma placement. The output updates as you type.

  3. 03Read the diagnostics

    Select a diagnostic to jump to its line, check columns, keys and indexes in the DDL summary, then download .sql, .md or .json.

What is in the workbench

Why the input never leaves

SQL carries table names you have not published, internal identifiers and the column shapes of live data. This tool is built so none of that is sent anywhere.

Questions

Does it really check three dialects?

Formatting and rules follow the dialect. :: casts, ILIKE and backtick identifiers pass only for PostgreSQL, AUTO_INCREMENT only for MySQL, AUTOINCREMENT only for SQLite, and LIMIT 10, 20 is marked MySQL-only.

Can formatting change what the statement does?

No. The formatter keeps the token order and only re-lays-out whitespace. Spaces inside strings, comments and the number of semicolons stay exactly as they were.

Why warn about SELECT *?

It moves more data than reading the columns you need and makes a covering index hard to use. It also breaks clients when a column is added or renamed.

Is a leading wildcard always wrong?

LIKE '%value' cannot narrow a B-tree range, so the scan is full. The warning asks whether a full-text index, a reversed index or a prefix search would do.

What does the DDL summary check?

Columns and types per table, NULL and defaults, PK, FK, UNIQUE and CHECK, plus CREATE INDEX and inline indexes. A foreign key without an index slows joins and parent deletes, so it is warned about.

Does it rewrite my SQL?

No. Only the layout changes; diagnostics name the line and the direction a fix should take for the chosen dialect. Keeping the original text is safer to review.

Five articles: formatting rules, dialect differences, conditions that defeat an index, a DDL review, and dangerous write statements.

Format a statement now

A synthetic example is already loaded. Paste your own query and it still never leaves the browser.