Verbatim @-strings vs regular strings — when do I escape?
Regular C# strings ("...") interpret backslash sequences, so a Windows path needs every backslash doubled. Verbatim strings (@"...") treat backslashes literally, so the same path stays as @"C:\Users\admin". The only escape inside a verbatim string is doubling the double quote ("") to embed it. This tool produces regular-string output — for verbatim, you can usually paste the raw value directly.
Does it escape Unicode?
No — non-ASCII characters are passed through unchanged because C# source files are UTF-8 by default and accept literal Unicode. If your project enforces ASCII-only source (a legacy convention), use \uXXXX or \xN[N..] escapes manually. Modern C# projects rarely need this.
Do I need to escape single quotes?
Not inside C# string literals — a single quote is just an ordinary character there. You only escape ' inside char literals ('a'). The tool follows that rule and leaves single quotes alone in string output.
What about $-interpolated and @-interpolated strings?
In a $-interpolated string ($"Hello {name}"), curly braces have meaning — to embed a literal brace, double it: {{ or }}. The escape transformation produced by this tool does not double braces, so paste output into a non-interpolated string or escape braces manually if you target $"".
How does this differ from C#'s System.Web.HttpUtility.JavaScriptStringEncode?
JavaScriptStringEncode targets JavaScript string literals — it escapes Unicode, surrogate pairs, and certain HTML-sensitive characters. The .NET escape tool here targets C# itself: backslash, double quote, and the standard C# control-character escapes. The two operate on different parsers and produce different output.
Can I use it for VB.NET?
VB.NET strings use a different convention — double quotes are escaped by doubling them ("") and there is no backslash escape in VB string literals. You would substitute \"" for the doubled-quote convention. This tool produces C#-style output; for VB.NET prefer doubled-quote-only escaping.
Are tabs and newlines preserved as escape sequences?
Yes. Real tab characters become \t, line feeds become \n, carriage returns become \r, and form feed / backspace become \f / \b. The output is a single-line C# string literal you can paste directly into source code without breaking compilation.
Is the input sent to a server?
No. The escape transformation runs in JavaScript inside your browser. C# string content often includes connection strings, secrets, or proprietary algorithms — none of it leaves your device. Verify in DevTools Network tab.