How to use SQL Escape
- Paste or type the text you want to escape.
- Adjust the options if you need to.
- Copy the escaped result.
About SQL Escape
The apostrophe is the quote character for SQL strings, so a name like O'Brien ends the string early and breaks the statement. In standard SQL the fix is to double it: 'O''Brien'. MySQL also accepts a backslash.
A word of caution up front. Escaping by hand is fine for a one-off script or a migration, but for application code, use parameterised queries. They are the only reliable protection against SQL injection.
What gets escaped
Standard SQL: a single quote becomes two single quotes. MySQL style: backslash, single and double quotes, NUL, line breaks and Ctrl+Z get a backslash.