Code Formatter

Free. No sign-up. Your input is processed in your browser.

One place to format code in many languages.

How to use it

  1. Choose a language.
  2. Paste your code.
  3. Copy or download the result.

Engines

C#, Java, C and C++ use clang-format with its Microsoft base style and a line length of 120. The other languages use Prettier with a line length of 100.

Limits

Your project may use different style rules, and this tool does not read your configuration files. Formatting C-family code does not check that it compiles. Review changes before committing them. This tool loads a larger file than the others, so the first visit takes longer.

Questions

Is Python supported?

Not yet.

Does it use my .editorconfig or .prettierrc?

No. Only the options on screen are used.

Related tools

See all tools