Docomint

SQL-String escapen

Escaped einfache Anführungszeichen in einem String, damit er sicher als Literal in einer SQL-Abfrage verwendet werden kann.

🔒 Processed on your device

What is a SQL-String escapen?

Doubles every single quote in a string (O'Brien becomes O''Brien), the standard SQL escaping every major database understands — useful for quickly building a one-off literal by hand in a console or script. In application code, always use parameterized queries/prepared statements instead of string-escaping to build SQL with user input; this tool is for ad-hoc use, not a substitute for that.

How to use the SQL-String escapen

  1. Paste a string containing single quotes
  2. Every single quote is doubled, instantly on your device
  3. Copy the escaped literal into your query

Example

"O'Brien's Diner" becomes "O''Brien''s Diner" — safe to drop inside SQL single quotes.

Frequently asked questions

Is manually escaping quotes safe against SQL injection?

Not reliably for application code handling user input — quote-doubling is the standard SQL literal-escaping rule, but parameterized queries/prepared statements are the actual defense against injection. Use this tool for quick, trusted, ad-hoc use, not as an input-sanitization strategy.

Is my data uploaded anywhere?

No — SQL-String escapen runs entirely in your browser using JavaScript/WebAssembly. Your data is never sent to a server.

Does this also escape double-quoted identifiers, like column or table names?

No — this escapes single-quoted string literals only. Double-quoted identifiers use a different escaping rule (doubling the double quote) and aren't handled by this tool.

Related tools