Verbatim strings ignored
The tool targets regular string literals.
Fix: For verbatim strings (@"..."), duplicate "" manually.
header • up to 320x100 / 728x90
Escape or unescape C# string literals including \x, \u, and \U Unicode escape sequences
Output will appear here...
content bottom • up to 300x250
sidebar • 160x600
Last reviewed:
C# is a modern, statically typed language from Microsoft used to build .NET applications, games with Unity, and cross-platform services.
C# Escape / Unescape converts arbitrary text into a C#-safe string literal or decodes one back to raw text. It supports the full escape set (\0, \a, \b, \f, \n, \r, \t, \v, \", \\) plus \x1–4, \uNNNN and \UNNNNNNNN Unicode escapes.
It's widely used in .NET shops for generating SQL scripts, embedding JSON payloads, and reverse-engineering decompiled assemblies.
Path: C:\Temp Café
Path: C:\\Temp\nCaf\u00e9
The tool targets regular string literals.
Fix: For verbatim strings (@"..."), duplicate "" manually.
Short \U sequences fail to parse.
Fix: Use \uNNNN for BMP chars and \UNNNNNNNN for astral code points.
Yes — \UNNNNNNNN maps to a full Unicode code point via String.fromCodePoint.
Use regular string literal escaping. For verbatim, only "" needs doubling.
Yes, characters above 0x7E become \uNNNN.
Not directly — PowerShell uses different escape rules.
No — processing is entirely client-side.
Pair C# escape with Java, JS, and XML escape helpers for smooth cross-language migrations. You can also browse the full Encoders & Decoders category for more options.
Round-trip Java string literals — escape quotes, backslashes, newlines, and Unicode sequences
Escape or unescape JavaScript string literals with backslash, quote, Unicode, and control-character handling
Escape or unescape XML special characters and numeric entities with one click
Escape or unescape SQL string literals using standard single-quote doubling
Escape JSON special characters
Convert text to HTML entities or decode HTML entities back to text in a single bidirectional tool
Escape strings for C#
Wrap a raw string in a JSON string literal — perfect for embedding content in a JSON payload
Wrap an XML document in a JSON string literal for safe embedding in payloads
Format and beautify C# code online with proper indentation and .NET coding style. Paste C# and get clean, readable output following best practices.
Encode or decode HTML entities
Encode text to HTML entities