String Escape / Unescape

Developer Tools

Escape & unescape JSON, JS and regex text

FreePrivateInstant
Add a file · .txt .md .csv .json … · up to 2.00 MB
Format
Embed this tool on your websiteFree
  1. Choose how tall the frame should be.
  2. Press Copy code.
  3. Paste it into your page, blog, WordPress or Notion HTML block.
Height

The tool runs inside your visitor's browser, nothing is uploaded, and a small "Powered by ToolCloak" line stays under it. The second line (script) is optional: it makes the frame fit the tool's height.

Similar tools you may like

History

All history →

String Escape / Unescape — at a glance

Safely put text inside JSON, JavaScript or regex — or turn escaped text back into normal text.

Text
He said "Hi"
Run
Escaped
He said \"Hi\"

How to use it — step by step

Any text with quotes, backslashes, tabs or new lines.

1

Paste your input

Paste or type your content into the big input box.

2

Choose options

Pick the mode and options that fit what you need.

3

Convert Now

Press the button. The result is created instantly on your device.

4

Copy the result

Check the output and press Copy to use it anywhere.

Pro tips

Small things that make the result better.

✦Use JSON escape before pasting text into a JSON value.
✦Regex escape protects symbols like . * + ?
✦Unescape reverses \n, \t and \uXXXX codes.

Quick facts

3 formatsJSON, JS, regex
Two-wayescape & unescape
Unicode\uXXXX supported
Privatelocal only

Frequently Asked Questions

Why do I need to escape text?+

Characters like quotes and backslashes have special meaning in code, so they must be written with a backslash.

What does unescape do?+

It converts sequences like \n back into real new lines and \" back into quotes.

Does it add surrounding quotes?+

No — you get just the inside of the string, so you can place it in your own quotes.

Is my data safe?+

Yes. Everything runs inside your own browser. Your text, files and images are never uploaded to any server.

More Free Tools