SQL Escape & Unescape

Escape strings as SQL string literals.

About the SQL Escape & Unescape

Escape a string for use inside an SQL string literal by doubling single quotes, or unescape doubled quotes back to characters.

Frequently asked questions

Does escaping make my query injection-safe?

No — always use parameterised queries in real code. This tool is for reading, escaping, and understanding literals.

Which databases does it match?

The standard double-quote rule used by MySQL, PostgreSQL, SQL Server, and SQLite.

Related tools