UTILS.
Private by default
\n

Backslash Escaper

Escape or unescape backslash sequences such as \n, \t and \uXXXX.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
output

About this tool

Convert real newlines and tabs to backslash sequences or expand them back, entirely in your browser.

Frequently asked questions

Which sequences are supported?
Escaping handles backslash, newline, tab, carriage return and double quote; unescaping also expands \uXXXX code points.
Does it parse JSON?
No — it works directly on backslash sequences in plain text rather than full JSON values.

More tools