Escape/Unescape

Escape and unescape text for various programming languages

Browser ProcessingYour data never leaves your browser

JSON

Escape for JSON strings

"hello" → \"hello\"

JavaScript

Escape for JS strings

line1\nline2

HTML

Escape HTML entities

<div> → &lt;div&gt;

URL

Percent-encode for URLs

hello world → hello%20world

CSV

Escape for CSV fields

a,b → "a,b"

SQL

Escape for SQL strings

O'Brien → O''Brien

Regex

Escape regex metacharacters

.*? → \.\*\?

Shell

Escape for shell commands

$var → \$var

\n → newline
\t → tab
\r → return
\\ → backslash
\" → quote
\' → apostrophe
\0 → null
\b → backspace