Developer String Escape & Unescape Tools — JSON, JS, SQL & More

Escape and unescape strings for JSON, regex, JavaScript, CSS and XML. Deterministic, offline, free — built for daily dev work.

  • No length limits
  • No registration
  • Free forever
  • Your text never leaves your browser

Escape strings for JSON, JavaScript, CSS, XML, and regular expressions without hand-counting backslashes. The output is deterministic and the conversion runs in your browser.

Choose the syntax context before escaping. A string safe inside JSON is not automatically safe inside HTML, JavaScript source, a SQL query, or a regular expression.

Options
Output
Your result will appear here as you type.

Why String Escaping Is Critical

Quotes, backslashes, control characters, and newlines have syntax meaning. Leaving them raw can break a parser, terminate a string early, or turn data into executable syntax.

Escaping prevents syntax collisions. It does not validate business input or replace context-aware output encoding and parameterized database queries.

The 5 Developer Escape Tools You Need

Escaping vs. Encoding vs. Hashing

Escaping makes literal data safe inside a particular syntax context.

Encoding changes representation for transport, such as Base64 or percent encoding.

Hashing creates a one-way digest. It is useful for integrity and password verification workflows, not for recovering the original string.

FAQ

Does escaping prevent all injection attacks?

No. Escaping is context-specific and easy to misuse. Use prepared statements for SQL and context-aware output encoding for HTML and JavaScript.

How do I unescape a string in Python or JavaScript?

Use the language parser or a context-specific decoder rather than chained replacements. This site can help inspect and convert the string before you place it in code.

Explore other tools

Your text never leaves your browser

Every tool runs locally on your device. Nothing you paste is uploaded, stored, or tracked.