sqlfmt
sqlfmt is an online SQL formatter and validator for working with queries in PostgreSQL, MySQL, SQLite, SQL Server (T-SQL), and BigQuery.
What sqlfmt is
sqlfmt is an online SQL formatter and validator for working with queries in PostgreSQL, MySQL, SQLite, SQL Server (T-SQL), and BigQuery. Its formatting options cover keyword case, indentation, comma style, and line width; it can also flag misspelled keywords and report syntax errors with their exact line and column. Formatting, validation, and typo suggestions run locally in the browser. SQL goes to the service only when you save a snippet or create a shareable link. The free plan includes 20 analyses per day, all five dialects, live formatting, and saved snippets and history. Pro costs $9/month and adds unlimited analyses and REST API access with API keys. Pro API use is capped at 60 requests per minute per key, with examples for Shell, Node, Python, Ruby, and PHP in the API reference. Saved snippets and formatting options are tied to an account and can be deleted at any time. The service lists Google and GitHub as sign-in providers.
Good
- Supports five SQL dialects.
- Reports syntax errors by line and column.
- Formatting and validation run locally in the browser.
- Free plan includes 20 analyses per day.
- Saved snippets and formatting options can be deleted.
Watch out
- Free plan is limited to 20 analyses per day.
- Pro API is limited to 60 requests per minute per key.
- SQL is sent to the service when saving or sharing snippets.
Who it suits
sqlfmt suits people who need to format and check SQL in one of its five supported dialects. Pro may suit users who need unlimited analyses or API access.
Verdict
sqlfmt combines configurable formatting with dialect-specific validation and typo suggestions. The free plan has a daily analysis limit; Pro adds unlimited analyses and API access for $9/month.
Plans and prices
From sqlfmt's own pricing page, checked 8 Oct 2001.
| Plan | Price | What it gives you |
|---|---|---|
| Free | Free | 20 analyses per day · all 5 dialects · live formatting · saved snippets & history · $0/forever |
| Pro | $9 a month | Unlimited analyses · all Free features · REST API access with API keys · export and shareable links coming soon · $9/month |
The facts
Each one read from sqlfmt's own pages, with the date it was checked.
What it does
- Analytics
- The service uses Google Analytics and PostHog for usage and technical data, including page views, interactions, browser and device details, and approximate location derived from IP address.checked 8 Oct 2001
- API
- Pro subscribers can use POST /api/v1/analyze with a Bearer API key; the API is limited to 60 requests per minute per key.checked 8 Oct 2001
- API integrations
- The API reference provides examples for Shell, Node, Python, Ruby, and PHP.checked 8 Oct 2001
- Data storage
- Saved SQL snippets and formatting options are associated with the user's account and can be deleted at any time.checked 8 Oct 2001
- Dialects
- It supports PostgreSQL, MySQL, SQLite, SQL Server (T-SQL), and BigQuery.checked 8 Oct 2001
- Formatting
- It formats SQL using configurable keyword case, indentation, comma style, and line width.checked 8 Oct 2001
- Product
- sqlfmt is an online SQL formatter and validator that also flags misspelled keywords.checked 8 Oct 2001
- Security and privacy
- The privacy policy says SQL input, formatted SQL, and validation details are masked in PostHog session replay recordings before they leave the browser.checked 8 Oct 2001
- Sign-in
- The privacy policy lists Google and GitHub as sign-in providers.checked 8 Oct 2001
- Support
- The maker lists [email protected] as the fastest way to reach it for questions, bug reports, feature ideas, and feedback.checked 8 Oct 2001
- Validation
- It parses SQL by dialect and reports syntax errors with the exact line and column.checked 8 Oct 2001
Where it runs
- Browser processing
- Formatting, validation, and typo suggestions run locally in the browser, and SQL is sent to the service only when a user saves a snippet or creates a shareable link.checked 8 Oct 2001
The company
- Maker
- The About page says sqlfmt was built by Sharon Ben-Moshe.checked 8 Oct 2001
Alternatives to sqlfmt
- 1
Poor SQL
Free planOpen sourceWebAPIExtensionLinux7.3Free plan - 2
SQLFormat.org
Free planOpen sourceWebAPIExtensionSelf-hosted7.1Free plan - 3
sqlfmt
Free planWebAPILinuxSelf-hosted6.7Free plan - 4
RegSQL
Free planWeb6.5From $8 a month - 5
SQLCheck
Free planLinuxmacOSWindows6.5Free plan - 6

SQLFluff
Free planAPILinuxmacOSSelf-hosted6.4Free plan
