clang-format presets
C formatting supports LLVM, Google, Chromium, Mozilla, WebKit, Microsoft, and custom .clang-format YAML styles.
Active style: Google
Input
Output
Formatted output will appear here.
Paste or import C above and click Prettify to reformat it with consistent indentation and spacing — free, in your browser, with nothing uploaded to a server. Powered by clang-format.
C formatting supports LLVM, Google, Chromium, Mozilla, WebKit, Microsoft, and custom .clang-format YAML styles.
clang-format formats C source text; it does not compile the code or validate headers and symbols.
Need to convert Markdown instead? Try the free Markdown to Word/HTML/PDF converter.
Need to run some numbers? Try the free online calculators.
Paste your C code, click Prettify, and it's reformatted using clang-format (Google style) — the same engine used by real C/C++ codebases.
Google style is the default, and you can switch to LLVM, Chromium, Mozilla, WebKit, Microsoft, or paste a custom .clang-format YAML config.
No. clang-format runs in your browser via WebAssembly — nothing is uploaded.
JSON formatter · JavaScript formatter · TypeScript formatter · CSS formatter · YAML formatter · C++ formatter · VBScript formatter
We use cookies to show ads via Google AdSense. See our Privacy Policy for details.