文字列をエスケープする

特殊文字をエスケープ表記に変換し、文字列やコード内で表現します。

入力: テキスト結果: テキスト

テキスト入力

ツールの設定

使用例

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

入力

He said "hello".

Expected answer

"He said \"hello\"."
エスケープレベル
Minimal
エスケープ引用
Double
JSON 互換
On
ES6互換
On
大文字16進数
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
大文字16進数
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
大文字16進数
Off
Represent 'tab\tseparated' as a JSON string

入力

tab	separated

Expected answer

"tab\tseparated"
エスケープレベル
Minimal
エスケープ引用
Double
JSON 互換
On
ES6互換
On
大文字16進数
Off
Represent "single quote: '" as a JSON string

入力

single quote: '

Expected answer

"single quote: '"
エスケープレベル
Minimal
エスケープ引用
Double
JSON 互換
On
ES6互換
On
大文字16進数
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
大文字16進数
Off
double quotes

入力

Hello "World"!

Expected answer

Hello \"World\"!
エスケープレベル
Special chars
エスケープ引用
Double
JSON 互換
Off
ES6互換
On
大文字16進数
Off
single quotes

入力

Escape 'these' quotes.

Expected answer

Escape \'these\' quotes.
エスケープレベル
Special chars
エスケープ引用
Single
JSON 互換
Off
ES6互換
On
大文字16進数
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
大文字16進数
Off

パラメーター

パラメーター既定値入力と選択肢
エスケープレベル特殊文字特殊文字, すべて, 最小
エスケープ引用シングルシングル, 倍精度浮動小数点, バッククォート
JSON 互換falseオンまたはオフ
ES6互換trueオンまたはオフ
大文字16進数falseオンまたはオフ

関連ツール

ユーティリティ

操作の参考資料

元の技術文書を見る (English)