Skip to content
Rotina Diária

Escape and Unescape Strings

Escape quotes, slashes, and line breaks for JSON, JavaScript, C#, SQL, and regex—and unescape them again.

Processed on your device. Nothing you type is sent anywhere.

How to use: Escape and Unescape Strings

  1. Choose Escape (text → code) or Unescape (code → text).
  2. Select a language: JSON, JavaScript, C#, SQL, or regular expression.
  3. Paste your text and copy the result—with or without quotes.

About this tool

Each language has its own rules. In JSON, double quotes, backslashes, and control characters must be escaped (\", \\, \n). In JavaScript, single quotes and backticks must be escaped too. In regular C# strings, use \"; in verbatim strings like @"…", double the quotes (""). In SQL, a single quote becomes two (O''Brien).

For regular expressions, special characters . * + ? ^ $ ( ) [ ] { } | \ / are prefixed with a backslash so any text is matched literally. When unescaping, invalid sequences are flagged with their line and column.

Important: escaping quotes in SQL is no substitute for parameterized queries, the right way to prevent SQL injection in applications. Use escaping for manual scripts and test data.

Frequently asked questions

What's the difference between escaping and unescaping?

Escaping converts plain text into a format you can paste inside quotes in code (a line break becomes \n). Unescaping does the reverse: it reads a code literal and returns the original text.

Can I paste the string with its quotes?

Yes. When unescaping, outer quotes ("…", '…', or @"…") are automatically recognized and removed.

Is it really free? Is there a daily limit?

It's free with no daily limits. Processing happens on your device, so there's no per-use cost and no need to limit you.

Does it work on phones?

Yes. The site works in any modern browser on Android, iPhone, Windows, Mac, and Linux—no installation needed.