List of code formatting tools

JSON Formatter

Formats a JSON string/file with your desired indentation level creating an object tree with color highlights. You can now clearly identify object constructs (objects, arrays and members). The JSON tree that is created can be navigated by collapsing the individual nodes one at a time if desired.

Features
  • No limit on the size of the JSON string/file to format
  • Formats your JSON string/file with 6 indentation level: 2 spaces, 3 spaces, 4 spaces, compact mode, JavaScript escaped and tab separated
  • Creates a tree representation of the JSON objects for easy navigation (if file is under 1meg, else formats as plain text)
  • Color highlights the different construct of your JSON objects

HTML Formatter

Formats a HTML string/file with your desired indentation level. The formatting rules are not configurable but I think it provides the user with the best possible output.

Features
  • No hard limit on the size of the HTML string/file to format
  • Formats the HTML with 3 indentation level: 3 spaces, 4 spaces and tab separated

XML Formatter

Formats a XML string/file with your desired indentation level. The formatting rules are not configurable but it uses a per-element indentation pattern giving the best readability.

Features
  • No hard limit on the size of the XML string/file
  • Formats the XML with 4 indentation level: 2 spaces, 3 spaces, 4 spaces and tab separated

SQL Formatter

Formats a SQL string with your desired indentation level. The formatting rules are not configurable. The indentation logic uses that of Hibernate. The formatter DOES NOT validate the SQL and it will still format invalid SQL statements.

The SQL validator is on my TODO list, although it might take me a gazillion years to do it because of the specificities of each RDBMS.

Features
  • No hard limit on the size of the SQL string
  • Formats the SQL with 4 indentation level: 2 spaces, 3 paces, 4 spaces and tab separated
  • Formats the SQL regardless of the validity of the statement