---
name: "sqlformat"
section: "1"
platform: "linux"
package: "sqlformat"
version: "0.5.3-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/sqlformat"
---

# sqlformat(1)

reformat SQL

## NAME

sqlformat - reformat SQL

## SYNOPSIS

**sqlformat** \[ *OPTION* \] ... \[ *FILE* \] ...

## DESCRIPTION

The \`sqlformat' command-line tool can be used to reformat SQL file according to specified options or prepare a snippet in in some programming language (only Python and PHP currently supported). Use "-" for *FILE* to read from stdin.

## OPTIONS

- **-i** *CHOICE*\|**--identifiers**=*FORMAT*

  Change case of identifiers. *FORMAT* is one of "upper", "lower", "capitalize".

- **-k** *CHOICE*\|**--keywords**=*FORMAT*

  Change case of keywords. *FORMAT* is one of "upper", "lower", "capitalize".

- **-l** *CHOICE*\|**--language**=*LANG*

  Output a snippet in programming language LANG. *LANG* can be "python", "php".

- **-o** *FILE*\|**--outfile**=*FILE*

  Write output to *FILE* (defaults to stdout).

- **-r**\|**--reindent**

  Reindent statements.

- **--indent\_width**=*INDENT\_WIDTH*

  Set indent width to *INDENT\_WIDTH*. Default is 2 spaces.

- **--wrap\_after**=*WRAP\_AFTER*

  The column limit for wrapping comma-separated lists. If unspecified, it puts every item in the list on its own line.

- **--strip-comments**

  **Remove comments.**

- **-h**\|**--help**

  **Print a short help message and exit.** **All subsequent options are ignored.**

- **--verbose**

  **Verbose output.**

- **--version**

  **Print program's version number and exit.**

## AUTHORS

**This man page was written by Andriy Senkovych \<jolly\_roger@itblog.org.ua\>**
