SQL Escape / Unescape is a free online developer tool to escape unsafe characters in SQL statements to prevent SQL injection or unescape SQL statements to their original unsafe characters. Supports backslash escapes.
This tool is split into two modes: SQL Escape
and SQL Unescape
.
SQL Escape - Escapes unsafe SQL statements by doubling all the single quotes. Enter SQL statements in the input field, and the escaped version will be displayed accordingly.
By default, this tool does not escape backslashes \
and double quotes "
. Only single quotes are escaped by doubling themselves ''
.
However, if your SQL engine supports backslashes, you can enable the backslash supported
option to escape the special characters \
, '
, and "
using a backslash. For example:
\
is converted to \\
'
is converted to \'
"
is converted to \"
SQL Unescape - Unescapes SQL statements to their original unsafe string by converting all the double single quotes to normal single quotes. Enter SQL statements in the input field, and the unescaped version will be displayed accordingly.
If the backslash supported
option is enabled, the following characters will be converted like so.
\\
is converted to \
\'
is converted to '
\"
is converted to "
You can copy the result to your clipboard using the copy button when you're done escaping or unescaping SQL statements.