XKit
Dev-Tools
|
Diff-Tools
|
Calculators
|
Converters
|
Generators
|
Temp Mail
Toggle Menu
Search Tools
⌘
K
Toggle theme
SQL Formatter
Format and beautify your SQL queries for better readability
Input SQL
SELECT id, name, email FROM users WHERE active = true ORDER BY name;
Formatted SQL
Copy
1
// Your formatted SQL will appear here...
Language
Indentation
Lines Between Queries
Keyword case
DataType case
Function case
Identifier case
Use Tabs
Dense Operators
Semicolon on Separate line
Format SQL
Clear
SQL Examples
Formatting Tips
SQL Examples
Simple SELECT
SELECT id, name, email FROM users WHERE active = true ORDER BY name;
JOIN Example
SELECT u.name, o.order_date, o.total FROM users u JOIN orders o ON u.id = o.user_id WHERE o.total > 100;
Complex Query
SELECT department, COUNT(*) as emp_count, AVG(salary) as avg_salary FROM employees WHERE hire_date > '2020-01-01' GROUP BY department HAVING COUNT(*) > 5 ORDER BY avg_salary DESC;
INSERT Statement
INSERT INTO users (name, email, created_at) VALUES ('John Doe', 'john@example.com', NOW()), ('Jane Smith', 'jane@example.com', NOW());