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.
Close the gaps with real-world projects
Build industry projects on ByteLabs and add verified proof of your skills to your public profile.
How to use the Escape and Unescape
- Choose JSON string, HTML entities or URL component in Mode.
- Paste your text into the Text box.
- Click Escape to make it safe for that format, or Unescape to reverse it.
- Copy the output with the Copy button.
An example, step by step (example only)
You enter
He said "hi" & <b>left</b> (mode HTML entities, Escape)
The tool shows
He said "hi" & <b>left</b>
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.