What SQL Unescape does
SQL Unescape reverses SQL escaping, turning escape sequences back into the characters they stand for, so you can read text copied from source code, logs or data files.
SQL Unescape examples
The built-in sample
Input
It''s the user''s choiceOutput
It's the user's choiceThis is the input that the Load sample button fills in.
Doubled apostrophes
Input
O''Brien''s orderOutput
O'Brien's orderEach pair of single quotes becomes one.
A value copied with its quotes
Input
'It''s 5 o''clock'Output
'It's 5 o'clock'The opening and closing quote of the literal are not removed: paste only what is between them.
Each output was produced by running this tool on the input above it.
How it works
Unescaping applies these rules in reverse:
| Escaped form | Character |
|---|---|
| '' | ' |
Details and limits
- Every pair of single quotes becomes one. Paste the content of the literal without the quote before and after it; those two are single and are left in place.
- Backslash escapes such as
\'or\n, which MySQL accepts, are not decoded. - Prefixes that some databases put before a literal, such as
N'...'for Unicode strings in SQL Server orE'...'for escape strings in PostgreSQL, are not understood. Remove the prefix together with the quotes. - The typical use is reading values out of a database dump or a logged
INSERTstatement, where every apostrophe in the data appears twice.
Questions
Is my data uploaded when I use SQL Unescape?
No. The tool runs in your browser, so what you paste or open is processed on your own device and is not sent to a server.
What does SQL Unescape do?
SQL Unescape reverses SQL escaping, turning escape sequences back into the characters they stand for, so you can read text copied from source code, logs or data files.
Are there any limits I should know about?
Every pair of single quotes becomes one. Paste the content of the literal without the quote before and after it; those two are single and are left in place. Backslash escapes such as \' or \n, which MySQL accepts, are not decoded.
Is there a size limit?
There is no fixed size limit. Everything happens on your device, so very large inputs depend on its memory and can take longer on a phone than on a computer.
Does it work on phones, and is it free?
Yes. It works in any current browser on Android phones, iPhones, tablets and computers. It is free and needs no account or sign-up.