Skip to main content

Text & Lists

String Escaper

Escape string for safe reuse. Enter the text, set the transformation rules, then copy the result.

Tool workspace

Your input stays in this browser.

Add the required input to continue.

Needs input

You can run the tool again after any change.

Options

Your result appears here

Escape string for safe reuse. Enter the text, set the transformation rules, then copy the result.

This tool runs open-source code from CyberChef by GCHQ (Apache License 2.0). See open-source credits.

String Escaper adds escape sequences for special characters, quotes, Unicode, or JSON-compatible output.

Don\'t\nstop Processing runs in the browser.

Instructions

  1. Provide text or data for this tool.
  2. Select the escape level and quote style.
  3. Enable JSON compatible output only for a JSON consumer.
  4. Check ES6 and hexadecimal case settings against the receiving language.

Example

Input: Don't stop

Settings: String Escaper: Use Special chars, Single quotes, and JSON compatible off.

Result: Don\'t\nstop

Limits

  • String Escaper: Escaping changes representation and does not encrypt the string.
  • String Escaper: A target parser must support the selected escape syntax.
  • String Escaper: The operation runs in the browser and does not need a network service.