Category guide
Code Formatting Tools
Formatting helps you review code that has been compressed, copied from a log, or edited by several people. Pick the formatter that understands the source language. The result is prepared in your browser, so you can inspect it before copying or downloading it.
Choose the right tool
HTML Formatter
Choose this for HTML markup with nested elements that needs readable indentation before a review.
CSS Formatter
Choose this for stylesheet rules whose selectors and declarations are hard to scan on one line.
SQL Formatter
Choose a SQL dialect before laying out clauses in a query copied from an application log.
JSON Formatter
For a JSON payload rather than source code, use the dedicated formatter with key sorting controls.
All tools
Example workflow: review a query from a log
- Copy the query into SQL Formatter and select the dialect used by the database that produced it.
- Read the formatted clauses and compare literals, identifiers, and placeholders with the original query.
- Run the query through your application's normal tests before using it in production.
Before you use the result
Formatting changes presentation; it does not prove that a document is safe, a selector matches the intended element, or a query returns the correct rows. Check behavior with the appropriate parser and application tests.
Choose the source language first
HTML, CSS, and SQL have different grammar. HTML Formatter helps expose element nesting, while CSS Formatter groups rules and declarations for review. SQL Formatter lays out query clauses using the dialect you select. If the text is a JSON response embedded in an HTML page or log, extract the JSON and use JSON Formatter instead. That keeps the editor’s expectations aligned with the text you are processing.
Review the result, not just its appearance
A readable query is easier to discuss in a code review, but its layout does not establish that its joins or filters are correct. Likewise, formatted HTML can still contain unsafe user content, and formatted CSS can still apply an unintended rule. Compare the output with the original, then use the application or browser to test behavior. The formatters work locally and do not execute the code you enter.