Suggestions appear as you type. Use the up and down arrows to choose one and Enter to open it.

This page's audience our own tag's counts — open to see them
–Visits
–Page views
–Clicks to vendors
–Time on page
–Reading now
Clicks to vendors, by tool
  • –
Top countries
  • –
Devices
  • –

– · visits, page views and clicks counted by our own tag, which counts more than our checked analytics; every figure rounded down · how we count

pgFormatter

Free#3 of 25 in SQL Linters and FormattersCode Formatting Tools

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.

8.8/10Editor score
pgFormatter8.8 Visit pgFormatter

At a glance

  • Editor score
    8.8 / 10
  • Pricing
    Free plan
  • Best for
    PostgreSQL teams needing dependable formatting
  • 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
  • Facts checked
    20 Sep 2026
pgFormatter screenshot
  • 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

Plans Free planFree Free to use — no paid tier required for the core job.
See plans on github.com

pgFormatter fact sheet

Free planYes
Paid fromFree
Supported SQL dialectsSQL-92, SQL-99, SQL-2003, SQL-2008, SQL-2011, PostgreSQL; works with other databases
Automatic fixesYes
Custom rulesNot verified
Editor extensionsYes
CI/CD integrationYes
Configuration fileYes
DeploymentSelf-hosted, Browser extension
PlatformsWeb, Linux
SupportDocs, Community
Built forSolo, Small business, Mid-market (editorial estimate)
Integrations5 integrations: Vim, Neovim, Atom, Visual Studio Code, pre-commit
PricingFree plan
Websitegithub.com
Facts checked20 Sep 2026

pgFormatter integrations

pgFormatter lists 5 integrations on its own site.

  • Vim
  • Neovim
  • Atom
  • Visual Studio Code
  • pre-commit

Alternatives to pgFormatter

See all pgFormatter alternatives →

pgFormatter vs the competition

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

Reviews come only from verified accounts. Sign in or create an account first — your e-mail is never shown.

Your rating

0 characters · at least 80, up to 3,000

Posted from your verified account. Reviews appear after an editor reads them, usually within two working days.

Featured on iTechGuides

Featured on iTechGuides — pgFormatter 8.8/10

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