Client-Side Sandbox Active: 0 KB Uploaded to Cloud | Preparing offline mode…

PrivateDataForge

Your data never leaves this browser

Escape single quotes in SQL batch INSERT

Manually escaping apostrophes is the classic way to break an INSERT. Drop your file here and every single quote in every string value is doubled for you, exactly as the SQL standard requires: O'Connor becomes 'O''Connor'.

You do not have to remember which cells contain apostrophes. The generator escapes the entire dataset in one pass, and you can see the result before you copy it.

SQL INSERT

Drop a file to generate INSERT statements

Processing stays in this browser. Guests can process up to 500 rows per file.

How to use this tool

  1. 1Drop the file that contains the text with apostrophes.
  2. 2Look at the generated SQL: quotes are already doubled.
  3. 3Pick the dialect so escaping matches your database.
  4. 4Copy the safe statements.

Frequently asked questions

How are single quotes escaped?
Each single quote is doubled, so ' becomes ''. This is the SQL standard and works in PostgreSQL, MySQL, and SQLite.
Does it also escape double quotes?
Double quotes inside a string value do not need escaping in SQL string literals, so they are left as-is.
What about backslashes?
Standard SQL does not treat backslash specially. If your MySQL instance runs with strict escaping modes, double-check the output.
Can I see the escaped value before importing?
Yes. The SQL pane shows the exact text you will copy, so you can confirm the escaping first.

Private by design

This tool runs entirely in your browser. Files, tables, and results are never uploaded to a server — you can even disconnect your network and keep working. See the Privacy Policy.