About Text to JSON String
Convert any plain text into a properly escaped JSON string literal. Handles quotes, backslashes, newlines, tab characters, carriage returns, and all other characters that require escaping per the JSON specification (RFC 8259). Also supports the reverse — unescaping a JSON string back to plain text.
How to Use Text to JSON String
- 1
Enter your text
Paste or type the text you want to use as a JSON string value.
- 2
Escape
Click Escape to JSON to see the properly escaped version, ready to paste between JSON double quotes.
- 3
Copy the result
Copy the escaped string to embed directly in your JSON data.
Common Use Cases
- Embedding multiline text as a JSON property value
- Preparing user input for JSON API requests
- Debugging JSON parse errors caused by unescaped characters
- Encoding configuration values for JSON config files
Frequently Asked Questions
Why do I need to escape text for JSON?
Can I unescape a JSON string too?
Related Tools
JSON Formatter
Format, validate, and beautify JSON data with syntax highlighting.
URL Encoder/Decoder
Encode or decode URL components for safe use in web addresses.
Base64 Encoder/Decoder
Encode text to Base64 or decode Base64 strings back to plain text.
Word Counter
Count words, characters, sentences, and paragraphs in any text.
Case Converter
Convert text between uppercase, lowercase, title case, sentence case, and more.
Lorem Ipsum Generator
Generate placeholder text for designs, mockups, and layouts.