ホーム
Tom Utilities

JavaScript エスケープ / アンエスケープ

HTML・CSS・JavaScript

テキストを安全な JavaScript 文字列リテラルにエスケープ、またはエスケープされた文字列をデコードします。

入力

結果

使い方

Escaping JavaScript strings

Encode escapes quotes, backslashes and control characters. Decode reverses the process.

  1. Paste text or a literal.
  2. Press Encode or Decode.
  3. Copy the result.

よくある質問

Which quote style is used?

Single quotes are used by default and inner quotes are escaped accordingly.

Does it handle unicode?

Yes, non ASCII characters are preserved or escaped using unicode escape sequences.