What this does
Paste a JSON document to encode it as one JSON string literal. Use the result when a document must be embedded as text in code or another JSON value.
Example
Input:
{"id":7,"name":"Ada"}
String literal:
"{\"id\":7,\"name\":\"Ada\"}"Limits and behavior
- Input must be valid JSON.
- The result includes the outer quotes of the JSON string literal.