# Install sql-formatter with npm

Format whitespace in a SQL query to make it more readable. Version 15.8.2 via npm; verified 2026-06-21. Also installable with nix: nix profile install nixpkgs#sql-formatter.

## Install

```sh
sudo av install npm:sql-formatter
```

Additional install commands:

### Portable and language managers

- npm (100%):

```sh
npm install -g sql-formatter
```

  Evidence: local npm package metadata

## Package facts

- **Package key:** npm:sql-formatter
- **Package manager:** npm
- **Package manager page:** <https://www.npmjs.com/package/sql-formatter>
- **Version:** 15.8.2
- **Source summary:** Format whitespace in a SQL query to make it more readable
- **Repository:** <https://github.com/sql-formatter-org/sql-formatter>
- **License:** MIT
- **Source archive:** <https://registry.npmjs.org/sql-formatter/-/sql-formatter-15.8.2.tgz>
- **Issue tracker:** <https://github.com/sql-formatter-org/sql-formatter/issues>
- **Published:** 2026-06-21T10:50:16.756Z
- **Last updated:** 2026-06-21T10:50:16.756Z
- **Generated:** 2026-08-04T22:13:35+00:00

## Executables

- sql-formatter (cli)

## Dependencies

- argparse
- nearley

## Build dependencies

- @babel/cli
- @babel/core
- @babel/plugin-proposal-class-properties
- @babel/preset-env
- @babel/preset-typescript
- @jest/globals
- @types/babel__core
- @types/jest
- @types/nearley
- @types/node
- @typescript-eslint/eslint-plugin
- @typescript-eslint/parser
- babel-eslint
- babel-jest
- babel-loader
- babel-plugin-add-module-exports
- babel-plugin-inline-import
- dedent-js
- eslint
- eslint-config-airbnb-base
- eslint-config-airbnb-typescript
- eslint-config-prettier
- eslint-plugin-import
- eslint-plugin-prettier
- jest
- npm-run-all
- prettier
- release-it
- release-it-pnpm
- rimraf
- ts-jest
- ts-loader
- typescript
- webpack
- webpack-cli
- webpack-merge

## Install behavior

- Post-install hook: not defined
- Bottle: not available

## Freshness

- Page generated: 2026-08-04
- Package-manager version: 15.8.2
- Package-manager updated: 2026-06-21
- Local data: ok
- Upstream repository: https://github.com/sql-formatter-org/sql-formatter
- info: No cached GitHub release or tag data was available.

## Security Notes

No matching local secret-handling manifest was found for sql-formatter. Package metadata is still published here so future coverage has a stable package URL.


## Source Database Details

- **Source Database:** npm registry
- **Dist Tags:** Beta: 15.5.0-beta.2, Beta1: 9.0.0-beta1, Beta2: 9.0.0-beta2, Beta3: 9.0.0-beta3, Beta4: 9.0.0-beta4, Latest: 15.8.2
- **Version Count:** 177
- **Maintainers:** nene, inferrinizzard
- **Publisher:** nene
- **Integrity:** sha512-kTYRg5FIcvsDtYUG2Qn9pYT6xKwiLJN5TTIvc5Mur6hIg4pSfdpHu8Yyu5bqESLHnVM3mXzD446cb2+uEaKZXg==
- **Shasum:** ac0684864b3ac850e455dc915adbca78dd51aeb8
- **Unpacked Size:** 3,116,487
- **File Count:** 0
- **Created At:** 2016-09-14T13:11:06.027Z
- **Latest Published At:** 2026-06-21T10:50:16.756Z
- **Modified At:** 2026-06-21T10:50:16.860Z

## Other Package-Manager Records

- Nix - sql-formatter: normalized package name match | nixpkgs package indexes: pkgs/by-name/sq/sql-formatter/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Related links

- [Text processing packages](https://pkg.so/text-processing-tools/) - Matched curated package taxonomy and local package facts.
- [sql-formatter](https://pkg.so/brew/sql-formatter/) - Same normalized package name appears in another local ecosystem. Shared terms: cli, developer, developer-tools, formatter, query.
- [sql-lint](https://pkg.so/brew/sql-lint/) - Local metadata places this package in an adjacent workflow. Shared terms: cli, database, developer, developer-tools, mysql.
- [sql-translator](https://pkg.so/brew/sql-translator/) - Local metadata places this package in an adjacent workflow. Shared terms: cli, database, developer, developer-tools, more.
- [sql-formatter](https://pkg.so/brew/sql-formatter/) - Same normalized package name exists in another local package ecosystem.

## Sources

- pkg.so package database
- package-page enrichment
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
