跳脫字串

把特殊字元寫成跳脫序列,便于在字串或源碼中表示。

輸入: 文本結果: 文本

文本輸入

工具選項

範例

Represent 'He said "hello".' as a JSON string

輸入

He said "hello".

Expected answer

"He said \"hello\"."
跳脫級别
Minimal
跳脫引號
Double
兼容 JSON
On
兼容 ES6
On
大寫十六進位
Off
Represent 'C:\\logs\\release.txt' as a JSON string

輸入

C:\logs\release.txt

Expected answer

"C:\\logs\\release.txt"
跳脫級别
Minimal
跳脫引號
Double
兼容 JSON
On
兼容 ES6
On
大寫十六進位
Off
Represent 'line one\nline two' as a JSON string

輸入

line one
line two

Expected answer

"line one\nline two"
跳脫級别
Minimal
跳脫引號
Double
兼容 JSON
On
兼容 ES6
On
大寫十六進位
Off
Represent 'tab\tseparated' as a JSON string

輸入

tab	separated

Expected answer

"tab\tseparated"
跳脫級别
Minimal
跳脫引號
Double
兼容 JSON
On
兼容 ES6
On
大寫十六進位
Off
Represent "single quote: '" as a JSON string

輸入

single quote: '

Expected answer

"single quote: '"
跳脫級别
Minimal
跳脫引號
Double
兼容 JSON
On
兼容 ES6
On
大寫十六進位
Off
complex

輸入

4ec985786aa10a7515d8be2d.bin

115 bytes

下載

Expected answer

null\0backspace\btab\tnewline\nverticaltab\x0bformfeed\fcarriagereturn\rdoublequote"singlequote\'hex\xa9unicode\u2665codepoint\u{1d306}
跳脫級别
Special chars
跳脫引號
Single
兼容 JSON
Off
兼容 ES6
On
大寫十六進位
Off
double quotes

輸入

Hello "World"!

Expected answer

Hello \"World\"!
跳脫級别
Special chars
跳脫引號
Double
兼容 JSON
Off
兼容 ES6
On
大寫十六進位
Off
single quotes

輸入

Escape 'these' quotes.

Expected answer

Escape \'these\' quotes.
跳脫級别
Special chars
跳脫引號
Single
兼容 JSON
Off
兼容 ES6
On
大寫十六進位
Off
special characters

輸入

1203ab8e4358d1fe9949e85d.bin

100 bytes

下載

Expected answer

Fizz & buzz\n\ttabbed newline\rcarriage returned line\nbackspace character: \"\b\" form feed character: \"\f\"
跳脫級别
Special chars
跳脫引號
Double
兼容 JSON
Off
兼容 ES6
On
大寫十六進位
Off

参數

参數默認值輸入與選項
跳脫級别Special 字元Special 字元, Everything, Minimal
跳脫引號SingleSingle, Double, Backtick
兼容 JSONfalse開啟或关閉
兼容 ES6true開啟或关閉
大寫十六進位false開啟或关閉

相关工具

實用工具

操作参考

查看原始技术文檔 (English)