Skip to content
Created by Iternal Technologies, the AI Strategy ExpertsBy Iternal (opens in a new tab)

Escape & Encode

JavaScript Unescape

JavaScript string

Paste a JavaScript string literal, with or without quotes. Escapes are decoded as you type.

Text

About JavaScript Unescape

JavaScript Unescape turns source escapes back into text. \n, \t, \xHH, \uXXXX and \u{...} become the characters they name, including an emoji written as one code point or as a surrogate pair.

If the input, ignoring space at the ends, starts and ends with the same quote, those quotes are removed and the inside is decoded. A bad escape, such as \q or a short \u sequence, is reported at that backslash instead of guessing.

Decoding runs in your browser and the text you paste is never uploaded. Swap sends the decoded text to JavaScript Escape when you want to encode it again.

Frequently asked questions

What does unescaping a JavaScript string do?

It reverses JavaScript string escapes: \n becomes a line break, \" becomes a double quote, \\ becomes one backslash, and \x, \u and \u{} escapes become the character they name.

Do the surrounding quotes have to be included?

No. If the input, ignoring space at the ends, starts and ends with the same quote, those two quotes are removed and the inside is decoded. Otherwise the whole input is decoded, including any quote marks.

Which Unicode forms are accepted?

\u followed by exactly four hex digits is one UTF-16 code unit, so an emoji written as two escapes comes back together. \u{...} takes one to six hex digits and must be a scalar value, not a surrogate and not above U+10FFFF. \x takes exactly two hex digits. Hex may be upper or lower case.

What happens when an escape is invalid?

The output is replaced by a short note that names the problem, and Jump selects the backslash that starts the bad escape. Text after that escape is not decoded.

Is the text I paste uploaded anywhere?

No. Decoding runs in your browser and the text you paste is never uploaded, logged or stored. Google Analytics records page views and feature use, never content.

  • JavaScript Escape

    Escape text into a JavaScript string literal as you type: quotes, backslashes, line breaks and controls. Runs in your browser; your text is never uploaded.

  • JSON Escape / Unescape

    Turn text into a valid JSON string literal, or decode one back to plain text.

  • URL Encode / Decode

    Percent-encode text for a URL, or decode a percent-encoded string.

  • Base64 Encode / Decode

    Encode text as Base64, or decode Base64 back to text.

  • HTML Escape / Unescape

    Escape text for HTML, or decode entities back to characters.

Iternal · AI Blueprint Builder

Plan the AI initiative, not just the output

The AI Blueprint Builder scores each use case across value, feasibility, cost, governance, risk, adoption and readiness before you commit budget. Free to start, about 60 minutes.

Open the AI Blueprint Builder (opens in a new tab)