Use the formatter to review compact C snippets. It applies general C-style layout rules, not compiler validation; check the output with your toolchain.
Runs locally in your browserPaste a C file or snippet into the editor and press the format button: the tool re-breaks the lines after braces and semicolons, indents the result with tabs and renders it highlighted in the panel below.
It is a text-level layout pass, not a compiler. String literals, comments and preprocessor lines pass through untouched, and the editor keeps your original text so you can compare the two.
Measured on the page: char *p="a;b}"; keeps the semicolon and the closing brace inside the string, the comment /* block ; { } */ keeps its punctuation, and a macro with backslash continuations (#define LONG(a) do { \ ...) comes back character for character, including #define X {1,2} on a single line.
That is the point of the tool: only whitespace moves. When a snippet depends on exact spacing inside macros or on continuation lines, the formatter leaves those lines alone rather than risk changing the program.
The pass is driven by text scanning, not by a grammar, so compact one-liners are expanded by rules. struct S{int a;char *b;};typedef struct S S; becomes four lines, but the trailing };typedef struct S S; stays on one line: expressions are not re-spaced.
Nothing is compiled, parsed or validated. A missing semicolon, unbalanced braces or invalid syntax produce a best-effort layout instead of an error message, so treat the output as a readable draft and run it through your compiler or linter afterwards.
Formatting runs entirely inside the page. A 64 KB sample (4,000 statements, about 82 KB of output) returns in under a second in Chrome, and the run issues no network requests at all, so it needs no connection.
Above roughly 120,000 characters of output the panel switches to plain text without colours, which keeps long files from stalling the tab. For files that size, splitting the input or using a local formatter is still the more comfortable workflow.