Format C# code with clang-format WASM using Microsoft style. Namespace indentation, K&R braces, method separation, 100-column limit. 100% browser-based.
The C# Formatter is a clang-format WASM-powered, browser-based tool that instantly formats C# source code using Microsoft style conventions. Using a WebAssembly port of clang-format in a Web Worker, it applies full namespace body indentation, K&R (attached) brace style, automatic blank lines between method and property definitions, a 100-column line limit, and configurable indent width. The output matches the style produced by `dotnet format` and `editorconfig` Microsoft defaults — without any installation. Your code never leaves the browser.
QWhich C# style guide does this use?
BasedOnStyle: Microsoft in clang-format, with additional overrides for namespace indentation (All), brace style (Attach / K&R), and blank lines between definitions (SeparateDefinitionBlocks: Always).
QIs this equivalent to running `dotnet format`?
The output closely follows Microsoft's default C# style, but `dotnet format` also applies Roslyn-based diagnostics and code-fix suggestions. This tool focuses on whitespace and formatting only.
QDoes it support modern C# features?
Yes — records, primary constructors, pattern matching, init-only setters, nullable reference types, top-level statements, and C# 12 features are all formatted correctly.
QIs my code sent to a server?
No. The clang-format WASM binary runs entirely inside your browser in a Web Worker. No code is transmitted to any server.