Z

C / C++ Formatter

Reformat C or C++ source — brace style, indent width, and preprocessor placement controls.

Free No signup Client-side Privacy friendly

How to use

  1. 1 Pick C or C++.
  2. 2 Paste source.
  3. 3 Pick brace style, indent size, and where preprocessor lines should sit.
  4. 4 Copy or download the result.

Why use this tool

  • Astyle-equivalent rule set: braces, indent, preprocessor placement.
  • Preprocessor lines can stay at column 0 or follow nesting — your call.
  • Pure client-side — your code never leaves the browser.
  • For canonical output use clang-format locally with your .clang-format file.

Frequently asked questions

Does this match clang-format?

Approximate — we apply indent and brace style only. clang-format also handles pointer alignment, column-limit wrapping, and access-modifier indent. Use clang-format locally for canonical output.

C vs C++ — what changes?

The rule set is shared. The toggle controls which sample we load and which extension the download uses.

Will it preserve my macros?

Macro definitions on preprocessor lines are kept verbatim. Multi-line macros with trailing backslash are kept on consecutive lines but each is treated as one preprocessor line.

Summary

C / C++ Formatter is a free developer utility by Zerethon Tools. Reformat C or C++ source — brace style, indent width, and preprocessor placement controls. Runs entirely in the browser — no signup, no upload.

Category
Developer
Pricing
Free
Privacy
Browser-based
Signup
Not required

Privacy

Your data never leaves your browser unless explicitly stated. C / C++ Formatter runs entirely client-side — no server upload, no logging, no tracking of your input.

Related tools

Build, share, and grow on Zerethon Social

Free signup. Earn points, collect achievements, and connect with creators worldwide.

Try Zerethon free