Need to embed plain text in a JSON file or API request? This free converter escapes line breaks, tabs, quotes, and special characters to produce a valid JSON string that will not break your data structures.
Converts newline characters to \n and carriage returns to \r so multiline text can be stored in a single JSON string value.
Converts tab characters to \t for safe inclusion in JSON.
Escapes double quotes as \" so they do not break the JSON string boundaries.
Converts backslash characters to \\ to prevent them from being interpreted as escape sequences.
The output is a properly quoted, escaped JSON string value that is valid according to the JSON specification (RFC 8259).
All conversion happens in your browser. No text is sent to any server.
Enable Auto-fill to carry your output to the next tool. Navigate back and forward with full state restoration — input, output, and all settings are preserved.
Take a multi-line template or message and convert it into a properly escaped JSON string for inclusion in configuration files.
Quickly create a JSON object with your text as a named field, ready to use as a request body for API testing.