Live Content Previewer Tool
Instantly retrieve a content from remote URL and show it nicely in a Facebook-like layout using the Live Content Previewer tool.
Escape and unescape strings for JSON, JavaScript, HTML, XML, CSV, SQL, and unicode contexts — free and entirely in your browser.
The String Escape / Unescape tool is a free online utility that converts text to and from the escaped form required by programming and markup languages. Paste a string, choose a context such as JSON, JavaScript, HTML, XML, CSV, SQL, or unicode \uXXXX, and it rewrites quotes, backslashes, newlines, tabs, and non-ASCII characters into safe escape sequences — or reverses the process to recover the original text.
Everything runs client-side in your browser, so the strings you paste are never uploaded, stored, or seen by any server. That makes it safe for API payloads, database snippets, and configuration values you would rather not send anywhere.
Escaping is the act of replacing characters that have a special meaning in a given syntax with a safe sequence that represents the literal character instead. A double quote inside a JSON value, a < in HTML, or a single quote in a SQL literal would otherwise break the surrounding structure, so each context defines escape sequences — \", <, or '' — that keep the data intact. Unescaping simply runs that translation in reverse.
Correct escaping is the difference between valid data and a syntax error, and in the case of SQL or HTML it is also a core defense against injection bugs. Getting a stray backslash or quote wrong can corrupt an entire config file or API request, so a tool that handles the rules for you removes an easy class of mistakes.
\n, \t, and \r sequences for source-code literals.&, <, >, ", and ' to entities so text renders literally.'.\uXXXX and backslash — convert non-ASCII and control characters to and from escape sequences.Reach for string escaping when you are embedding text inside a string literal — a JSON value, a JavaScript variable, or a SQL query. That is different from transport encoding: to make text safe inside a URL, the URL Encoder and Decoder applies percent-encoding, and to turn binary or text into an ASCII-safe blob you would use Base64 Encode and Decode. For web markup specifically, the HTML Encode tool focuses on rendering characters safely on a page, while the HTML Entity Converter maps characters to their named and numeric entities. Once you have unescaped a JSON payload here, the JSON Formatter is the natural next step to pretty-print and validate it.
No. All escaping and unescaping happens locally in your browser with client-side JavaScript. Your strings are never uploaded, stored, or seen by any server.
Escaping makes a string safe inside a specific syntax such as JSON, SQL, or HTML by neutralizing characters that have special meaning there. URL encoding makes text safe to travel inside a web address, and Base64 turns data into an ASCII-safe representation. They solve different problems and are not interchangeable.
No. The tool outputs the escaped string body so you can drop it between your own quotes. When unescaping, it accepts input with or without the wrapping quotes.
It uses the ANSI standard of doubling single quotes, which works across most databases. Escaping is a safety aid for building literals, but parameterized queries remain the best defense against SQL injection.
Yes. Newlines and tabs become sequences like \n and \t where the context requires it, and the unicode mode converts non-ASCII characters to and from \uXXXX escapes.
The tool validates as it decodes. If the input is not valid for the selected mode — for example malformed JSON escapes — it shows a clear error message instead of producing corrupted output.