cd .. (all tools)

String escape

Escape a string for JSON, JavaScript or a regex.

// Runs in your browser. Nothing you type here is sent anywhere.

Escape for
Direction

The contents of a JSON string: " and \ are escaped, line breaks become \n.

Result

"She said \"it's 5 o'clock\"\nPath: C:\\temp\\café.txt (cost: $5.00)"