pgFormatter
pgFormatter: A configurable, open-source formatter for PostgreSQL-focused SQL workflows. Ranked #3 of 25 in SQL Linters and Formatters by our editors (8.8/10); pricing: Free plan; best for postgreSQL teams needing dependable formatting.
At a glance
- Editor score8.8 / 10
- PricingFree plan
- Best forPostgreSQL teams needing dependable formatting
- Free planYes
- Paid fromFree
- Supported SQL dialectsSQL-92, SQL-99, SQL-2003, SQL-2008, SQL-2011, PostgreSQL; works with other databases
- Automatic fixesYes
- Facts checked20 Sep 2026

Where it wins
- Supports PostgreSQL, PL/pgSQL, and multiple SQL standard keyword sets
- Offers CLI, CGI, web, API, text, HTML, and JSON workflows
- Integrates with editors, pre-commit, configuration files, and CI/CD
Where it doesn't
- Its strongest coverage is PostgreSQL and related SQL standards
- Configuration may require project or user configuration files
- Does not include AI features
Our verdict on pgFormatter
pgFormatter is an open-source SQL formatter and beautifier focused on PostgreSQL and PL/pgSQL. It is suited to teams that want consistent SQL formatting across command-line workflows, web or CGI usage, editor environments, and automated development processes. Its published capabilities include formatting and beautification, autofix, literal anonymization, standard-input processing, multiple-file handling, and in-place formatting of SQL files. It supports SQL-92, SQL-99, SQL-2003, SQL-2008, SQL-2011, and PostgreSQL syntax, while also working with other databases.
The strongest fit is a workflow that needs control over formatting behavior rather than a single fixed style. Project or user configuration files allow formatting settings to be defined, while command-line execution supports standard input, multiple files, and in-place changes. The CGI application mode adds web access, text and HTML output, and JSON responses through its interface. Teams can connect pgFormatter with Vim, Neovim, Atom, Visual Studio Code, Docker, and pre-commit workflows. Its category capabilities also include editor extensions and CI/CD integration, making it applicable to both local editing and automated checks.
pgFormatter is particularly suitable for PostgreSQL teams that want a free, open-source formatter with several delivery modes and workflow integrations. The project includes a pre-commit hook integration and supports literal anonymization, which can be useful in formatting processes that handle SQL text. Its focus is narrower than a tool designed around broad database-specific coverage: the published emphasis is PostgreSQL and related SQL standards, even though it works with other databases. Teams seeking configurable formatting, CLI automation, or editor integration should consider it; teams looking for AI-assisted SQL features should choose a different tool.
Your product? Our editors can test pgFormatter in depth and publish a review, labelled as paid · from $149/mo →
pgFormatter pricing
pgFormatter fact sheet
| Free plan | Yes |
|---|---|
| Paid from | Free |
| Supported SQL dialects | SQL-92, SQL-99, SQL-2003, SQL-2008, SQL-2011, PostgreSQL; works with other databases |
| Automatic fixes | Yes |
| Custom rules | Not verified |
| Editor extensions | Yes |
| CI/CD integration | Yes |
| Configuration file | Yes |
| Deployment | Self-hosted, Browser extension |
| Platforms | Web, Linux |
| Support | Docs, Community |
| Built for | Solo, Small business, Mid-market (editorial estimate) |
| Integrations | 5 integrations: Vim, Neovim, Atom, Visual Studio Code, pre-commit |
| Pricing | Free plan |
| Website | github.com |
| Facts checked | 20 Sep 2026 |
pgFormatter integrations
pgFormatter lists 5 integrations on its own site.
- Vim
- Neovim
- Atom
- Visual Studio Code
- pre-commit
Alternatives to pgFormatter
- SQLFluffConfigurable SQL linting with autofix, templating, plugins, and CI workflows.9.4
- SqruffA focused open-source choice for dbt teams needing linting, formatting, and CI workflows.9.1
- SQL EnlightA Windows toolkit for analyzing, formatting, fixing, and refactoring T-SQL.8.6
See all pgFormatter alternatives →
pgFormatter vs the competition
- pgFormatter vs SQLFluff
- pgFormatter vs Sqruff
- pgFormatter vs SQL Enlight
- pgFormatter vs TSQLLint
- pgFormatter vs SQL Formatter
- pgFormatter vs SQL Formatter VSCode
Compare pgFormatter with any tool side by side →
Also Ranked In
pgFormatter is ranked in 2 of our directories.
Used pgFormatter? Be the first to review it
The editor score above is our own research. What this page doesn't have yet is a reader's view — what you used pgFormatter for, what worked and what didn't. No stars are seeded and no review is paid for; an editor reads every one before it appears.
Write a reviewTwo minutes · verified accounts only · read by an editor before it appears
Featured on iTechGuides
pgFormatter is listed in our SQL Linters and Formatters directory. Add the badge to your site — it links back to this page.
<a href="https://www.itechguides.com/products/pgformatter/"><img src="https://www.itechguides.com/best/badge/pgformatter.svg" alt="Featured on iTechGuides" width="230" height="46"></a>
Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026
Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.
Last updated · How we research and update


