Home › Programmer & Developer Tools › String Escape / Unescape

String Escape / Unescape

Escape and unescape strings for JSON, JavaScript, HTML entities, SQL, and C-style backslash sequences. Switch direction and format and watch the result update live — all processed locally in your browser.

How to use String Escape / Unescape

  1. Pick a format: JSON, JavaScript, HTML, SQL, or Backslash.
  2. Choose Escape or Unescape.
  3. Paste your string on the left and copy the converted result on the right.

Frequently asked questions

Which formats are supported?
JSON (string escaping), JavaScript (quotes, backticks, control chars), HTML entities (named and numeric), SQL (single-quote doubling), and C-style backslash escapes including \\xNN and \\uNNNN.
Why does unescaping sometimes show an error?
If the input contains an invalid escape sequence — for example a dangling backslash or a malformed \\u code — the parser reports it instead of producing a wrong result.

More Programmer & Developer Tools

  • JSON Validator — Validate, parse, and prettify JSON — load it from a URL or curl command, or convert a Python dict (single quotes, True/False/None) to JSON. Identifies syntax errors with precise line number reporting.
  • Code Beautifier — Automatically format your JavaScript, CSS, and HTML with customizable indentation and style rules.
  • Minifier — Reduce bundle sizes by removing whitespace, comments, and optimizing code structure for production.
  • SQL Formatter & Beautifier — Pretty-print and indent SQL queries across dialects (PostgreSQL, MySQL, T-SQL, BigQuery, and more) with configurable keyword casing.
  • XML Formatter — Beautify and validate XML with configurable indentation, or minify it to the smallest valid output — entirely in your browser.
  • JSON Diff — Compare two JSON objects (or Python dicts) structurally to spot added, removed, and changed keys — or switch to line and word mode for plain text and code.
  • RegEx Tester — Build and test regular expressions in real-time with syntax highlighting and match group visualization.
  • Base64 Converter — Quickly encode and decode strings or files to Base64 format for safe data transmission.