Text UtilitiesLesson 95Free preview
Escape/Unescape
This lesson is part of Web Developer Tools · All levels
Summary
This tool converts a particular character in the text into an escape form preceded by a backslash, and then it can return it to its original form. Escape is required when text is to be inserted into a literal string, JSON, HTML, or URL so that quotes and new lines do not damage the structure. The process, on the contrary, unescape, makes the seemingly strange text read back to normal. This tool is useful for checking data from APIs, log, or databases.
Key points
- Escape adds backslash before special characters such as quotes, backslash, and newlines
- Unescape reverses the process so that the text returns to its original form
- The rules of escape vary between languages and formats, so choose the appropriate mode.
- The escape result is not a substitute for security validation when compiling a query or HTML.
- Check the results in the text editor so that the invisible characters come into view.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.