beekeeper-studio/sql-formatter — explained in plain English
Analysis updated 2026-08-07 · repo last pushed 2026-03-27
Format SQL queries automatically inside VSCode every time you save a file.
Paste a tangled SQL query into the online demo to make it readable before sharing.
Enforce consistent SQL style rules across a team using an ESLint plugin.
Format SQL files in bulk from the command line.
| beekeeper-studio/sql-formatter | 0xdevalias/sparkle | 0xdevalias/webcrack | |
|---|---|---|---|
| Language | TypeScript | TypeScript | TypeScript |
| Last pushed | 2026-03-27 | 2022-06-29 | 2026-06-03 |
| Maintenance | Maintained | Dormant | Maintained |
| Setup difficulty | easy | moderate | moderate |
| Complexity | 2/5 | 4/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Install via npm and call it on a SQL string or run the CLI, no external dependencies required.
SQL Formatter is a tool that takes messy, hard-to-read SQL database queries and cleans them up with consistent spacing, line breaks, and indentation. If you've ever inherited a wall of unformatted database code, this tool turns it into something a human can actually scan and understand. At a high level, you give it a raw SQL string and it returns a neatly organized version. You can tell it which specific database system you're using, since databases like MySQL, Snowflake, and BigQuery have slightly different rules. It can also fill in placeholder values, so a query with a "?" in it can be turned into a complete, readable statement. Beyond being used directly in code, it works as a command-line tool to format files, and it plugs into popular code editors like VSCode. This is useful for anyone who writes or reviews database queries. For example, a developer building an app can use it inside their editor to automatically format SQL every time they save a file, keeping the team's code consistent. A product manager analyzing data might paste a long, tangled query into the tool's online demo to make it readable before showing it to colleagues. It can even enforce style rules in a team's workflow through an ESLint plugin. One notable thing is that the project is currently in maintenance mode. The creator is only fixing bugs here, not adding new features, because they are focusing on a newer tool that uses a smarter underlying engine to handle complex queries better. However, this version remains widely supported. It does have some limitations: it cannot format stored procedures, and it occasionally chokes on templated code, though the README provides a workaround using custom configuration options.
A tool that cleans up messy SQL database queries with consistent spacing, line breaks, and indentation. It supports many database systems, fills in placeholders, runs as a command-line tool, and plugs into code editors.
Mainly TypeScript. The stack also includes TypeScript, Node.js, CLI.
Maintained — commit in last 6 months (last push 2026-03-27).
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.