https://devtools.solutions/tools/encoding/escape-sql.html

Escape SQL String

Escape single quotes and other special characters in a SQL string value to prevent SQL injection.


    

Example input/output

Input: it's a test

Output: it''s a test

How it works

This tool escapes single quotes by doubling them (standard ANSI SQL) and optionally escapes other characters depending on the target database dialect. Use parameterised queries in production — this tool is for quick inspection only. Processing runs in your browser.

Common use cases

Related tools