How to use the JSON stringify text generator
The tool has one input box, one output box called JSON string and two controls. The output updates as you type, so there is no convert button.
- Paste or type your text into the Input box. Line breaks are allowed, and a final line break at the end of the text is escaped as well.
- Leave Mode on Text to JSON string to produce a quoted literal. Choose JSON string to text when you want to read a string that is already escaped.
- Tick Escape non-ASCII as \uXXXX if the receiving system only accepts plain ASCII. Leave it off for normal UTF-8 JSON.
- Use the Copy or Download button under the output.
The result includes the surrounding double quotes, so paste it as a complete value and do not add a second pair.