SQL String Escape
Escape text for an SQL string literal by doubling single quotes, or with MySQL backslash escapes.
Runs in your browserText → SQL string
Loading tool…
Example
O'Reilly's
O''Reilly''s
How to use the SQL String Escape
- Paste or type your Text into the input area, or open a file from your device.
- Adjust the options above the editor if the tool offers any.
- Review the SQL string result, then copy it or download it as a file.
Privacy and limitations
- Your data is processed on your device and is not uploaded to any server.
- Escaping is no substitute for parameterised queries; use prepared statements in application code.
Related converters
JSON to SQL ConverterGenerate SQL INSERT statements from a JSON array of objects, with proper quoting and NULLs.SQL FormatterBeautify SQL queries with dialect-aware formatting for MySQL, PostgreSQL, SQL Server, Oracle, SQLite and more.SQL String UnescapeTurn an SQL string literal back into plain text: strip quotes and collapse '' (or MySQL backslash escapes).CSV UnescapeRemove CSV quoting from a field: strip surrounding quotes and turn doubled quotes ("") back into single quotes.Java String EscapeEscape text for a Java string literal: backslashes, quotes, \n, \t and control characters, optionally as \uXXXX ASCII.CSV EscapeQuote a value for CSV per RFC 4180: wrap fields containing delimiters, quotes or line breaks and double inner quotes.Java String UnescapeDecode Java string escapes (\n, \t, \s, \uXXXX, octal) into plain text, flagging escapes Java would reject.HTML UnescapeConvert escaped HTML (<p>, &, ©, €) back to the original characters and markup.