Free string escape & unescape tool — JSON, JavaScript, CSV, SQL and HTML

Escaping runs entirely in your browser — nothing is uploaded.

🔤 String Escaper — Free Online Tool

Escape and unescape strings for JSON, JS, CSV, SQL and HTML, free. Escaping replaces characters that have special meaning in a format (quotes, backslashes, newlines, angle brackets) with safe sequences so a string can be embedded without breaking the surrounding syntax. This tool escapes and unescapes text for JSON, JavaScript, CSV, SQL and HTML — entirely in your browser.

🚀 Why use this String Escaper tool?

It converts raw text into a safely escaped literal (or reverses it) for whichever target syntax you pick, so embedded quotes and newlines don't break your code or data. 100% free, no registration, and complete privacy — everything runs locally in your browser, so your data never touches a server.

Key Features

↔️Escape & unescape

Go both ways — turn raw text into an escaped literal, or decode an escaped string back to plain text.

🎯Multiple targets

Pick the right rules for JSON, JavaScript, CSV, SQL or HTML so the output is valid in that context.

🔒100% private

Escaping runs locally in your browser; nothing you paste is uploaded or stored.

🆓Free, no signup

Unlimited use with no account, on desktop and mobile.

Popular Use Cases

Embedding data

  • Put text inside a JSON string
  • Hard-code a JS string literal
  • Inject text into HTML safely

Data & queries

  • Escape a CSV field with commas
  • Quote a value for SQL
  • Avoid breaking delimiters

Debugging

  • Decode an escaped log line
  • Read a stored JSON string
  • Reverse over-escaped text

What It Handles

Targets

  • JSON / JavaScript
  • CSV
  • SQL & HTML

Handles

  • Quotes & backslashes
  • Newlines & tabs
  • Special characters

Workflow

  • Two-way escape/unescape
  • Copy result
  • Runs offline

Sources & References

Frequently Asked Questions

What does escaping a string do?

It replaces characters that would break the surrounding syntax — like quotes, backslashes, and newlines — with safe escape sequences (e.g. \" or \n) so the text can be embedded as a literal without errors.

Which target should I choose?

Pick the format the string will live in: JSON/JavaScript for code literals, CSV for spreadsheet fields, SQL for query values, and HTML to convert characters like < and & into entities.

Does it prevent SQL injection or XSS?

Escaping helps, but it is not a substitute for parameterized queries (SQL) or proper output encoding/sanitization (HTML). Use this tool for one-off escaping, and use safe APIs in production code.

Is my text uploaded anywhere?

No. All escaping and unescaping happens in your browser; nothing you paste leaves your device.

Can I reverse an escaped string?

Yes. The tool unescapes too — paste an escaped string and choose unescape to recover the original raw text.

🎓 Pro Tips

  • Tip 1: Match the target to the destination exactly — JSON escaping is not the same as HTML escaping, and using the wrong one can leave a security hole or a syntax error.
  • Tip 2: For production SQL and HTML, prefer parameterized queries and your framework's auto-escaping over manual escaping.
  • Tip 3: JSON string rules are defined in RFC 8259 §7 — https://www.rfc-editor.org/rfc/rfc8259#section-7.