String escape
Escape a string for JSON, JavaScript or a regex.
Escape a string for JSON, JavaScript or a regex.
// Runs in your browser. Nothing you type here is sent anywhere.
The contents of a JSON string: " and \ are escaped, line breaks become \n.
"She said \"it's 5 o'clock\"\nPath: C:\\temp\\café.txt (cost: $5.00)"