Which brace style does the C# formatter use?
Allman style — opening braces on their own line, aligned with the keyword. This is the convention recommended by Microsoft, used by the .NET runtime, Roslyn, and Visual Studio default settings. K&R style (opening brace on the same line as the declaration) is uncommon in idiomatic C# and is not produced by this formatter.
Does formatting C# change how it compiles?
No. C# is whitespace-insensitive outside string literals and verbatim strings (@"..."). The formatted source produces byte-for-byte identical IL once compiled. The only exception is interpolated strings ($"...") containing newlines, which are preserved as-is.
How is this different from dotnet format or Roslyn?
dotnet format and the Roslyn formatter are full code-style fixers — they apply rules from your .editorconfig, including using-directive sorting, naming, and modifier ordering. This online formatter is a lighter pass: it normalises indentation and brace placement only, useful for snippets pasted from Stack Overflow, Slack, or auto-generated source where you do not want full project rules applied.
Does it handle LINQ method-chain queries correctly?
Yes. Method-chain LINQ (.Where().Select().OrderBy()) and query-syntax LINQ (from x in xs where ... select x) are both indented with the chain or clause aligned. For long chains, break each operator onto its own line indented one level under the source.
Will it format C# 11 raw string literals correctly?
Yes. Raw string literals (""" ... """) preserve their interior whitespace exactly — that is the whole point of the syntax. The formatter detects the triple-quote boundaries and leaves the contents untouched. Single-line raw strings are also kept on one line.
Is the C# code I paste sent to your servers?
No. Formatting runs entirely in your browser using JavaScript. Code containing connection strings, API keys, proprietary algorithms, or unreleased features never leaves your device. Open DevTools → Network and click Format to confirm no requests are made.
Does this format records and primary constructors?
Yes. C# 9 records, C# 12 primary constructors, and positional record syntax (record Person(string Name, int Age)) are formatted with the parameter list aligned and the body block indented Allman-style on a new line.
What is the difference between PascalCase, camelCase, and Hungarian in C#?
Microsoft conventions: PascalCase for types, methods, properties, and public members; camelCase for local variables and parameters; _camelCase prefix for private fields. Hungarian notation (strName, iCount) is discouraged in modern C#. The formatter does not rename identifiers — it only adjusts whitespace.