About this tool
Convert real newlines and tabs to backslash sequences or expand them back, entirely in your browser.
Escaping replaces five characters with backslash sequences: a backslash becomes \\, a line break \n, a tab \t, a carriage return \r and a double quote \". Everything else, including accented letters, is left as typed, and the result is not wrapped in quotes.
Unescaping turns \n, \t, \r, \\, \" and four-digit \uXXXX sequences back into real characters. Any other sequence, such as \b or \x41, is passed through unchanged rather than reported as an error. Escape runs on load and when you press its button, so choose escape or unescape again after editing the text.