C/C++ Formatter

Format C and C++ functions, classes, headers, templates, and pasted snippets with clang-format. It adjusts indentation, spaces, braces, and line breaks while preserving comments and program behavior.

C/C++ formatting styles

Select LLVM, Google, Chromium, Mozilla, WebKit, or GNU as the base style. The indent width accepts 1 to 16 spaces, and the column limit accepts 0 to 1000; use 0 for no line wrapping. Load a local source file, then copy or save the formatted result.