https://devtools.solutions/tools/code/code-format.html

Format Code

Format and pretty-print code blocks. Supports JSON, JavaScript, CSS, HTML, and SQL.


    

Example input/output

Input: function hello(){return "world"}

Output:

function hello() {
  return "world";
}

How it works

This tool applies language-appropriate formatting rules to your code. For JSON, it uses JSON.parse/stringify. For other formats, it applies indentation and whitespace normalisation rules. Processing runs in your browser.

Common use cases

Related tools