JSON String Escape
Example
Input:
He said "hi" New line
Output:
He said \"hi\"\nNew line
About this converter
Building JSON by string concatenation breaks the first time a value contains a quote or a newline — escaping is the fix, and this page does exactly the JSON string escaping rules: \" for quotes, \\ for backslashes, \n \r \t for the whitespace controls, and \uXXXX for other control characters. Non-ASCII characters are left as-is (JSON is Unicode text; escaping them is optional and harms readability). Paste the output between the quotes of a JSON string value, or wrap it in quotes for a complete literal. If you are doing this often in code, use your language's JSON serialiser instead — hand-built JSON is a bug farm, and this page is the bandage, not the cure.
Frequently Asked Questions
Does it escape Unicode like é?
No — JSON strings carry Unicode natively. Only the structurally dangerous characters (quote, backslash, controls) are escaped.
What is the result for a tab?
The two characters \t — JSON's escape for the tab character.