Convert raw text into escaped form suitable for pasting inside JSON quotes in code or configs.
Plain text
Escaped text
Related tools
How it works
Backslashes, double quotes, and common control characters become escape sequences like \n and \".
Output is the inner part of a JSON string without surrounding quotes.
Use cases
Hand-building JSON, embedding user text in APIs, or fixing broken string literals.
Privacy
Escaping runs locally; do not paste secrets on untrusted machines.
Common questions
- Are quotes added?
- Output is escaped content only; wrap in double quotes when building JSON.
- Unicode?
- Most characters pass through; control chars are escaped.
- Reverse operation?
- Use the JSON unescape tool.
- Whole JSON document?
- This tool escapes string content, not entire JSON structures.