Use C++ Formatter
Uses clang-format in local WebAssembly. Start with the sample, select the options and run the tool. Copy or download the result after reviewing it.
Behavior and limits
Uses clang-format in local WebAssembly. Choose a named style. Formatting does not compile, execute or prove that a program is valid. The engine is loaded only when needed.
Example input
#include <vector>
int main(){std::vector<int> v={1,2,3};return v.size();}
Expected behavior for the example
Formats the vector declaration, initializer list and main body using the selected style.
Check important output in the application that will consume it. Use the tool directory to find related formats and tasks.
Frequently asked questions
How does C++ Formatter handle my input?
Uses clang-format in local WebAssembly. Choose a named style. Formatting does not compile, execute or prove that a program is valid. The engine is loaded only when needed.
Is my input uploaded or saved automatically?
Processing runs locally in this browser. Input and results are not saved automatically. Downloads happen only when you choose them. The static preview blocks scripts and external resources when one is available.