Format & Edit
JSON String Escape
Encode text as a quoted JSON string with valid escapes for quotes and newlines.
Format & Edit
Encode text as a quoted JSON string with valid escapes for quotes and newlines.
Input: Text. Output: JSON string.
Use the workspace's Sample action to load example data, or paste this input and run the tool. Loading an example is an explicit action.
A quote: "hello"
A new lineEscaping produces one string value. It does not parse the input as an object or protect every HTML or shell context.
Your source and result are separate. Review transformations before applying them, and download an original copy when preserving exact input matters.
Decode a JSON string value into its underlying text.
Generate a JavaScript-compatible data literal from a strict JSON value.
Read practical JSON guides or learn how local processing works.