What this tool does
It reverses the one escaping rule standard SQL has for string literals: a single quote inside the string is written twice. Paste the literal and each '' becomes a single '.
If the text is wrapped in single quotes, the enclosing pair is removed first. That makes both forms work — 'O''Brien' and O''Brien both give O'Brien — so you can paste from a query or from a dumped column value without editing it first. Since the escape side wraps its output, the two are exact inverses: anything it produces comes back through this tool unchanged, quote characters included.
When you need it
Reading a literal out of a query log, a migration file or an ORM’s debug output, where the quoting has doubled up and the value is hard to read. Also for checking that a value was escaped once rather than twice: a name that comes back with a stray quote usually went through the escaping step one time too many.
What it does not do
Backslash escapes are not touched. MySQL accepts \' unless NO_BACKSLASH_ESCAPES is set, but that is a MySQL extension rather than standard SQL, and decoding it here would silently rewrite a literal meant for a database that has no such rule.
PostgreSQL’s escape strings (E'...') and dollar quoting ($$...$$) are likewise out of scope, as is a whole query: the tool reads one literal, and collapsing every doubled quote in a statement would destroy the ones belonging to other literals.
Private by design
Everything runs locally in your browser with JavaScript. Your data is never uploaded, which makes the tool safe for sensitive content, and it keeps working offline.