Quick access

Code Formatter

Format and beautify code in multiple languages.

Input
Output
Lines: Size:

About the Code Formatter

The code formatter re-indents code and adds line breaks so that minified or messy code becomes easy to read.

How to use it

  1. 1 Choose the language.
  2. 2 Paste your code.
  3. 3 Format it and copy the result.

Frequently asked questions

Does formatting change what my code does?

No. Only whitespace and line breaks change; the code behaves the same way.

Can it un-minify JavaScript?

It restores indentation and line breaks, but it cannot bring back original variable names if they were shortened during minification.

Is my code uploaded?

No. Formatting runs in your browser.