Micro Tools
Menu

Code Formatter

Format and beautify JSON, HTML, CSS, and SQL code with proper indentation and structure.

Formatter Options
Choose a language, paste your code, then format.
Input
Paste your unformatted code here
Output
Formatted result — read only
Formatting Notes

JSON

  • Validates structure before formatting
  • 2-space indentation applied consistently
  • Syntax errors surface a clear message

HTML

  • Void elements (br, img, input…) handled correctly
  • Nesting depth drives indentation automatically
  • Best for snippets; not a full HTML validator

CSS

  • Each declaration placed on its own line
  • Nested blocks indented by 2 spaces
  • Consecutive blank lines collapsed to one

SQL

  • Keywords uppercased (SELECT, FROM, WHERE…)
  • Major clauses each start on a new line
  • AND / OR conditions indented under WHERE