Text

String Escape

Escape and unescape strings for various languages.

How to use it

  1. Open Devly from the wrench in your menu bar, or press ⌃⌥⌘D. Press ⌘P, type String Escape and press Return.
  2. Choose Escape or Unescape at the top.
  3. Paste or type your text into Input.
  4. Adjust the Options on the right if you need to. The defaults are listed below.
  5. Press Escape, or ⌘↵.
  6. To go the other way, press Swap or ⌘S. The output moves into the input.
  7. Use Copy or ⇧⌘C to copy the result. ⌘L clears everything.

Options

OptionValuesDefault
FormatEscape format for target languageJavaScript/JSON, Python, Java, C/C++, PHP, SQL, CSV, XML, RegexJavaScript/JSON

Example

Real output from Devly, with the default options.

Input
He said "hello"
	and left.
He said \"hello\"\n\tand left.

From Terminal

With the free command-line tool installed:

Terminal
devly stringescape --path input.txt
# or pipe text in
pbpaste | devly stringescape

Quick Switch also finds it by: escape, unescape, string, quote, backslash, json, javascript.

More Text tools