JavaScript Escape / Unescape

About this tool

JavaScript's legacy escape() function replaces most non-alphanumeric characters with %XX hex sequences, and encodes characters above U+00FF as %uXXXX. It differs from URL encoding (encodeURIComponent): escape() leaves @*/+ untouched, does not correctly handle UTF-8, and produces the %uXXXX form that only unescape() understands. This tool reproduces that exact behaviour so you can read or generate legacy escaped strings.

Type text on top and press Escape to see the %XX / %uXXXX output; paste an escaped string on the bottom and press Unescape to recover the original. Everything runs locally in your browser using the native escape() and unescape() functions — nothing is uploaded, so it is safe for private strings.

Related tools

URL EncoderUnicode EscapeUTF-8 Encoder