转义/反转义

为各种编程语言转义和反转义文本

浏览器处理您的数据绝不离开浏览器

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

About 转义/反转义

为各种编程语言转义和反转义文本

Use this free online 编程工具 tool to work faster without installing extra software. The interface is built for quick input, clear output, and straightforward results on desktop and mobile devices.

Processing

This tool runs in your browser whenever possible, which keeps your inputs private and reduces unnecessary round-trips to the server.