Escape / Unescape

Escape and unescape strings for JSON, JavaScript, HTML and backslash sequences.

Result appears here…

Escaping Explained

Escaping replaces special characters with safe sequences so text can be embedded inside code or markup. JSON/JS escapes quotes, backslashes and control chars; HTML escapes < > & " '. Unescape reverses it. All local.

Frequently asked questions

What is the difference between the JSON, HTML and backslash modes?

JSON/JavaScript mode escapes quotes, backslashes and control characters so text is safe inside a string literal. HTML mode converts characters like <, > and & to entities so they display as text. Backslash mode handles generic \n, \t style sequences.

When do I need to escape text?

Whenever you embed arbitrary text into a structured format — putting a value into a JSON string, showing user input in HTML without it being parsed as markup, or placing special characters in code.

Does it run locally?

Yes. Escaping and unescaping happen in your browser with nothing sent to a server.