Escape & Encode
JavaScript Escape
Paste or type anything. Quotes, line breaks and controls become JavaScript string escapes as you type.
Escape & Encode
Paste or type anything. Quotes, line breaks and controls become JavaScript string escapes as you type.
JavaScript Escape turns text into the body of a JavaScript string literal. Quotes, backslashes, line breaks, tabs and other controls become source escapes such as \n and \u00XX. It writes a string literal, not the legacy escape() function.
With neither wrap option both quote marks are escaped, so the text can sit inside single or double quotes. Wrap in double quotes or Wrap in single quotes adds that pair; if both are on, double quotes win. Escape non-ASCII writes every code unit above U+007F as \uXXXX, and an emoji becomes two escapes. Line and paragraph separators are always \u2028 and \u2029. A null before a digit is written as \u0000 so the literal stays valid in strict mode.
Escaping runs in your browser and the text you paste is never uploaded. Swap sends the result to JavaScript Unescape so you can check the round trip.
It rewrites characters that would break a JavaScript string literal. Backslashes, line breaks, tabs and control characters become source escapes, and quote marks are escaped so the text can sit inside quotes. With the default settings the output has no surrounding quotes.
No. This writes a JavaScript string literal, the text between quotes in source code. It is not the legacy escape() function, which percent-encodes a string and is deprecated.
Turn on Wrap in double quotes or Wrap in single quotes when you want a complete literal to paste into code. If both are on, the output uses double quotes. With neither option, both quote marks are escaped and no quotes are added around the text.
Each UTF-16 code unit above U+007F is written as \uXXXX. An emoji, which is two units, becomes two escapes. A JavaScript engine reads those escapes back as the same text.
No. Escaping 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.
Decode a JavaScript string literal as you type: quotes, line breaks, hex, Unicode and emoji. Runs in your browser; your text is never uploaded.
Turn text into a valid JSON string literal, or decode one back to plain text.
Percent-encode text for a URL, or decode a percent-encoded string.
Encode text as Base64, or decode Base64 back to text.
Escape text for HTML, or decode entities back to characters.
Iternal · AI Blueprint Builder
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)↑↓ to move · ↵ to open · esc to close
aiformatting.app cleans up the text. The AI Blueprint Builder ranks the AI initiatives your team is weighing, scoring each use case across value, feasibility, cost, governance, risk, adoption and readiness before you commit budget.
Free to start · about 60 minutes · iternal.ai
Every tool here stays free, with no account to create. Leave a work email and the team behind aiformatting.app will send the occasional note on practical AI tooling.