CareerByteCode

Escape and Unescape JSON, HTML and URL

For developers embedding text in JSON payloads, HTML templates or query strings. Pick a mode and escape or unescape quotes, angle brackets, newlines and special characters correctly.

FreeRuns in your browserNothing uploadedNo sign-up neededAll 12 tools in the Developer Toolbox
Keep this resultSign in to email it to yourself or save it to your profile. The tool itself never needs an account.

ByteLabs

Close the gaps with real-world projects

Build industry projects on ByteLabs and add verified proof of your skills to your public profile.

Explore ByteLabs
How to use

How to use the Escape and Unescape

  1. Choose JSON string, HTML entities or URL component in Mode.
  2. Paste your text into the Text box.
  3. Click Escape to make it safe for that format, or Unescape to reverse it.
  4. Copy the output with the Copy button.
Worked example

An example, step by step

You enter

He said "hi" & <b>left</b> (mode HTML entities, Escape)

The tool shows

He said "hi" & <b>left</b>

FAQ

Questions about the Escape and Unescape

How do I escape a multi-line string for JSON?

Choose JSON string and click Escape. Newlines become \n, tabs become \t and double quotes get a backslash, ready to paste between quotes.

Which HTML characters are escaped?

The five that matter in markup: & < > double quote and single quote become & < > " and '.

Is URL component mode the same as a URL encoder?

It uses encodeURIComponent, so it escapes everything outside letters, digits and a few marks, including / ? & and =. Use it for single values, not whole URLs.

Is the Escape and Unescape free and private?

Yes. It is free, needs no sign-up and runs entirely in your browser, so what you type is not uploaded. You only sign in if you want to email a result to yourself or save it to your CareerByteCode profile.

Copied