JSON string escaper

Paste text to escape quotes, line breaks, and control characters.

Escape text so it can be placed inside a JSON string.

Input

Result

About this tool

The JSON string escaper converts plain text into content that is safe to place between JSON quotation marks. It escapes quotes, backslashes, line breaks, tabs, and other control characters. Use it when building a sample request body, storing multiline text in a JSON file, or checking how an application should serialize user input. The result contains the escaped content only, so you can insert it where needed.