JavaScript String encoding

In JavaScript, special characters inside a String can really mess things up. The web server can read the JavaScript file,
using the wrong encoding, the users browser can have the wrong encoding setting. A way to avoid that is to use escape codes.

Our online JavaScript Escape tool does that automatically.

Paste your text in below and get your escaped JavaScript String.

Enter/paste text to escape text to Java/.NET String:


Escaped String result: