Dev / Text & Code / SQL Formatter

SQL Validator — Check SQL Syntax & Errors Online Free

Format, minify, validate SQL · Auto-detect dialect · AI explain & optimize

💡

SQL Validator checks your queries for syntax errors, missing WHERE clauses on DELETE/UPDATE, unbalanced parentheses, unclosed strings, and performance warnings like SELECT * and leading wildcard LIKE patterns — all in your browser with no upload.

or drag & drop .sql / .txt anywhere · max 5MB
Ctrl+M to cycle
Dialect
✦ AI
INPUT
Indent
Keywords
OUTPUT
Formatted SQL will appear here…
In: 0 chars · 0 lines·Out: 0 chars · 0 B·0ms
0 uses · 0 secondsmin saved

About SQL Formatter

SQL Validator checks your queries for syntax errors, missing WHERE clauses on DELETE/UPDATE, unbalanced parentheses, unclosed strings, and performance warnings like SELECT * and leading wildcard LIKE patterns — all in your browser with no upload.

Frequently Asked Questions

What does the SQL Validator check?

It checks for: unclosed string literals, unbalanced parentheses, DELETE/UPDATE without WHERE clause (critical error), SELECT * usage (performance warning), leading wildcard LIKE patterns that cannot use indexes, subquery usage (suggest CTE instead), and missing semicolons.

What is the DELETE without WHERE error?

A DELETE statement without a WHERE clause deletes ALL rows in the table. This is a critical error flagged in red. Always add a WHERE clause or use TRUNCATE TABLE if you intentionally want to delete all rows.

Why is SELECT * a warning?

SELECT * retrieves all columns including ones you may not need, preventing index-only scans and increasing network transfer. Specifying column names explicitly improves query performance and maintainability.

What is the leading wildcard LIKE warning?

LIKE '%search%' with a leading % cannot use B-tree indexes and requires a full table scan. Consider a full-text search index (FULLTEXT in MySQL, tsvector in PostgreSQL) for better performance on large tables.

Does it validate dialect-specific syntax?

The validator checks common SQL issues that apply across all dialects. For dialect-specific syntax validation, select the appropriate dialect in the Dialect bar so the formatter correctly recognizes dialect keywords.

Ctrl+Enter FormatCtrl+M Cycle ModeCtrl+L ClearCtrl+S Download .sqlCtrl+Shift+C CopyF FullscreenP Pin? Help