SQL Formatter
Paste SQL and get uppercase keywords, broken lines and aligned subqueries. Processed entirely in your browser, never uploaded.
Content is processed in your browser and never uploaded
Formatted result
SELECT id, name, email FROM users WHERE age > 18 AND status = 'active' ORDER BY created_at desc LIMIT 10
Settings
Content is processed in your browser and never uploaded
Related tools
- JSON FormatterValidate, prettify and minify, with errors reported by line and column.
- Regex TesterLive match highlighting, capture groups and a replacement preview.
- CSV ⇄ JSON ConverterQuoted fields and flattened nesting, converted both ways locally.
- Markdown EditorEdit on the left, preview on the right, rendered as React elements to block XSS.
Frequently asked questions
- Is the SQL uploaded to a server?
- No. Formatting happens locally in your browser, so it suits queries that contain table structures or business conditions.
- Does it support MySQL / PostgreSQL dialects?
- The MVP uses generic SQL rules (uppercase keywords, clauses on new lines, indentation). Dialect differences for MySQL/PG are planned for phase 2.
- What happens with incomplete syntax?
- The tool only reformats; it does not validate syntax. Incomplete statements are formatted as far as they can be parsed, without crashing.
- How do I squeeze it onto one line?
- Click "Minify" to remove the extra spaces and line breaks — handy for pasting into logs or single-line config.