JSQLFormatter
manticore-projects.com
What it is
JSQLFormatter formats SQL for terminal output, documents, and wikis, and is available as a Java library or command-line executable. It parses SQL with a grammar into an abstract syntax tree rather than relying on regular expressions. Supported statements include SELECT, INSERT, MERGE, UPDATE, DELETE, CREATE, and ALTER, including WITH clauses and nested sub-selects. The listed dialects cover Oracle, SQL Server, MySQL, MariaDB, PostgreSQL, H2, DuckDB, BigQuery, Redshift, Databricks, and Snowflake. Formatting can preserve comments between keywords or within join conditions, while leaving comment-like string literals unchanged. Users can configure indentation, comma placement, and the casing of keywords, functions, and objects, with settings applied per invocation, file, or statement. Output options include ANSI terminal highlighting, HTML, and RTF. A Java-source feature imports SQL strings while retaining variables and can export them as String, StringBuilder, or MessageFormat. JSQLFormatter is free. Its license is Apache 2.0 from version 5.4 onward; releases through 5.3 were AGPL. A NetBeans plugin is a platform target, while Eclipse, JEdit, Squirrel SQL, and DBeaver are listed as planned.
Spec sheet
- Purpose
- JSQLFormatter is a platform independent SQL formatter, beautifier and pretty printer.Read 4 Oct 2026 · manticore-projects.com
- License
- JSQLFormatter is licensed under Apache 2.0 from version 5.4 onwards; releases through 5.3 were AGPL.Read 4 Oct 2026 · manticore-projects.com
- Founded
- 2011Read 28 Sep 2026 · manticore-projects.com
- Maker
- Manticore Projects describes itself as a consulting company for financial valuation, reporting and credit risk management.Read 4 Oct 2026 · manticore-projects.com
- Comments
- It preserves comments, including comments between keywords or inside join conditions, and leaves comment-like string literals alone.Read 4 Oct 2026 · manticore-projects.com
- Configuration
- Indent width, comma placement, and keyword, function and object casing can be configured per invocation, file or statement.Read 4 Oct 2026 · manticore-projects.com
- Database coverage
- The site lists Oracle, SQL Server, MySQL, MariaDB, PostgreSQL, H2, DuckDB, BigQuery, Redshift, Databricks and Snowflake.Read 4 Oct 2026 · manticore-projects.com
- IDE integrations
- The site says a NetBeans plugin is a platform target and lists Eclipse, JEdit, Squirrel SQL and DBeaver as planned.Read 4 Oct 2026 · manticore-projects.com
- Interfaces
- The product is offered as a Java library JAR from Maven Central and as an executable JAR for command-line use.Read 4 Oct 2026 · manticore-projects.com
- Java source
- It can import SQL strings from Java source while preserving variables and export them as String, StringBuilder or MessageFormat.Read 4 Oct 2026 · manticore-projects.com
- Native libraries
- The installation page labels native dynamic libraries as “Coming soon.”Read 4 Oct 2026 · manticore-projects.com
- Output formats
- It supports ANSI terminal highlighting and HTML and RTF output for documents and wikis.Read 4 Oct 2026 · manticore-projects.com
- Parsing
- It parses SQL into an abstract syntax tree using a real grammar rather than regular expressions.Read 4 Oct 2026 · manticore-projects.com
- Security and privacy
- The product page describes local Java and command-line use but does not state a security certification or compliance claim.Read 4 Oct 2026 · manticore-projects.com
- Statement coverage
- It supports SELECT, INSERT, MERGE, UPDATE, DELETE, CREATE and ALTER statements, including WITH clauses and nested sub-selects.Read 4 Oct 2026 · manticore-projects.com
Plans and prices
Strong points and limits
Strong points
- Parses SQL into an abstract syntax tree.
- Supports eleven listed database dialects.
- Preserves comments and leaves comment-like string literals alone.
- Offers ANSI, HTML, and RTF output.
- Configuration can be applied per statement.
Limits
- Eclipse, JEdit, Squirrel SQL, and DBeaver integrations are planned.
- Native dynamic libraries are labeled “Coming soon.”
- Licensing differs by release: Apache 2.0 from 5.4; earlier releases through 5.3 were AGPL.
Who it suits
JSQLFormatter suits developers who need to format SQL across the listed dialects, preserve comments, or work with SQL strings in Java source. It is offered as a library JAR and a command-line executable.
Verdict
JSQLFormatter offers broad listed dialect and statement coverage, with configurable formatting and several output formats. Check the release’s license and the status of any IDE integration you need.
Where Specifiction places it
- SQL Linters and Formatters#5 of 268.3