Developer Tools

String Escape Unescape Online - Escape JSON, JavaScript, and HTML

Escape or unescape strings for JSON, JavaScript, HTML, and debugging workflows. Convert quotes, line breaks, tabs, and entities locally.

View all Developer Tools

Continue Workflow

Related tools to try next

All tools
Browser Local No sign-up

Example

Escape quotes for JSON

Escaping quotes lets the text be safely used inside a JSON string value.

Input


                        He said "Hello World"
                      

Output


                        He said \"Hello World\"
                      

Escape a multiline value

Visible escape sequences make line breaks and tabs easier to place inside code or JSON examples.

Input


                        Line one
Line two	Tabbed
                      

Output


                        Line one\nLine two\tTabbed
                      

Practical Notes

How to Use

  1. 1. Paste the text or escaped string into the input box.
  2. 2. Choose Escape JSON, Escape JS, Escape HTML, or Unescape.
  3. 3. Review the output and confirm it matches the target context.
  4. 4. Copy the result into your code, API payload, documentation, or template.

Features

Use Cases

Frequently Asked Questions

What does string escaping mean?
String escaping converts special characters such as quotes, line breaks, tabs, and angle brackets into sequences that can be safely represented in a specific format.
Is JSON escaping the same as HTML escaping?
No. JSON escaping is designed for JSON string values, while HTML escaping is designed for displaying text inside HTML. Use the option that matches your target context.
Can this prevent XSS attacks?
HTML escaping can reduce risk when displaying text, but XSS prevention requires context-aware escaping, validation, and secure application design. Treat this as a utility, not a security audit.
Is my text uploaded?
No. Escape and unescape operations run locally in your browser after the page loads. Your text is not uploaded.
When should I use JSON escaping?
Use JSON escaping when text needs to become a JSON string value. It protects quotes, backslashes, line breaks, tabs, and other characters that would otherwise break the JSON string.
Why does escaping differ between formats?
Each format has its own syntax. A character that breaks HTML may be harmless in JSON, while a JSON backslash escape may not mean anything inside plain HTML.