Text & Docs
SQL Formatter
Format and check SQL locally for MySQL, PostgreSQL and SQLite with highlighting, line numbers, error locations, find and replace, undo, and download. No uploads.
About this tool
Edit SQL with syntax highlighting, line numbers, and find and replace. Choose a database dialect, indentation, and keyword case, independently format or check syntax, then copy, download, or apply results. Processing stays in your browser.
Best use cases
- Read joins and subqueries copied from logs or API debugging sessions.
- Standardize indentation and keyword case for documentation and code reviews.
- Check syntax for the selected dialect and jump to reported source positions.
How to use it
- Enter SQL and select MySQL, PostgreSQL, or SQLite.
- Select Format or press Shift + Alt + F. Use Ctrl/Cmd + F to find and replace; select Check syntax to see parsing status and error locations.
- Copy or download a .sql file, or apply results to the input with undo support. Each run supports up to 200,000 characters.
FAQ
Does this connect to a database or execute SQL?
No. Formatting runs locally on text without uploading SQL or connecting to a database.
Does a successful syntax check mean my SQL will execute?
No. It means the selected dialect parser recognizes the statements, without validating tables, columns, permissions, or execution. Some database extensions may be unsupported, so syntax checking and formatting remain independent.