SQL Formatter is a JavaScript library for pretty-printing SQL queries. It started as a port of a PHP Library, but has since considerably diverged. It supports various SQL dialects: GCP BigQuery, IBM DB2, Apache Hive, MariaDB, MySQL, Couchbase N1QL, Oracle PL/SQL, PostgreSQL, Amazon Redshift, SingleStoreDB, Snowflake, Spark, SQL Server Transact-SQL, Trino/Presto. See language option docs for more details. The CLI tool will be installed under sql-formatter and may be invoked via npx sql-formatter. If you don't use a module bundler, clone the repository, run npm install and grab a file from /dist directory to use inside a script tag. This makes SQL Formatter available as a global variable window.sqlFormatter.

Features

  • It started as a port of a PHP Library, but has since considerably diverged
  • SQL Formatter is a JavaScript library for pretty-printing SQL queries
  • It supports various SQL dialects
  • Usage as library
  • Placeholders replacement
  • Usage from command line

Project Samples

Project Activity

See All Activity >

Categories

Code Formatters

License

MIT License

Follow SQL Formatter

SQL Formatter Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of SQL Formatter!

Additional Project Details

Programming Language

TypeScript

Related Categories

TypeScript Code Formatters

Registered

2023-04-25