The same text in six formats
She said "it's 5 < 6?" escapes to:
- JSON:
She said \"it's 5 < 6?\" - HTML:
She said "it's 5 < 6?" - SQL:
She said "it''s 5 < 6?" - Regex:
She said "it's 5 < 6\?"
Escape or unescape text for JSON, JavaScript, HTML, CSV, SQL and regular expressions.
Runs in your browser — nothing you enter is sent to a server.
Choose the format your text is going into, then Escape or Unescape. The result updates as you type.
\", \n). JavaScript also escapes single quotes.&, <, > and quotes become entities.it''s).. * ? ( ) [ ], get a backslash so they match literally.She said "it's 5 < 6?" escapes to:
She said \"it's 5 < 6?\"She said "it's 5 < 6?"She said "it''s 5 < 6?"She said "it's 5 < 6\?"Line\nTab\té unescapes to "Line", a line break, "Tab", a tab and "é".
Don't rely on it. Use parameterised queries (prepared statements) in your code; they keep data and SQL apart completely. Escaping is for writing one-off queries and fixtures by hand.
JSON strings are always in double quotes, so single quotes stay as they are. JavaScript strings can use either, so both are escaped.
The text has an escape the format doesn't allow, such as a lone backslash at the end, an incomplete \u escape, or \x in JSON.
No. It is converted in your browser.
Escape text for HTML (< & ") or decode HTML entities back to characters.
Developer Tools
Percent-encode text for URLs and query strings, or decode %20-style encoded text back to readable text.
Developer Tools
Test JavaScript regular expressions with live highlighting, groups and replacement.
Developer Tools