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 review

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

A configurable, open-source formatter for PostgreSQL-focused SQL workflows.

8.8/10Editor score
pgFormatter8.8 Visit pgFormatter

Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026

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.

pgFormatter pros and cons

  • 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

pgFormatter fact sheet, pricing and score →

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