Web & Developer Utilities100% Client-Side

JSON String Escaper

A string inside JSON has rules for how it represents quotes, backslashes, and control characters such as line breaks. Paste the original text here to see its escaped form. The output is the content that goes between a pair of JSON double quotes, so you can copy it into an existing field. Use it for log messages, paths, or test data where literal punctuation and line breaks need to survive serialization.

Input
49 chars•2 lines
Output

Reverse tool

JSON Unescape

Turn escaped JSON string content into readable text. Restore quotes, tabs, line breaks, or Unicode characters from a string literal directly in your browser.

Open JSON Unescape

How to Use the JSON Escape Online

  1. 1Paste the actual value you want the JSON string to represent. Use real line breaks and tabs if those characters belong in the value.
  2. 2Check where the output adds a backslash. A literal double quote and a real newline are serialized as different escape sequences.
  3. 3Copy the output between the double quotes of the target JSON field. Add the quotes yourself if you are building the field from scratch.
  4. 4Validate the complete document with the JSON Validator, or use the JSON String Unescaper to confirm the escaped value round-trips to the original text.

Input & Output Examples

The embedded quotation marks and the real newline become escapes so the entire value can be written on a single line of JSON source.

Input Sample
She said "ship it".
Next line.
Expected Output
She said \"ship it\".\nNext line.

Each path separator becomes two backslashes in JSON source. A parser restores the single backslashes when it reads the field.

Input Sample
C:\logs\build.txt
Expected Output
C:\\logs\\build.txt

Practical Developer Workflows

  • Store a multiline message in a JSON fixture without introducing raw line breaks inside the string literal.
  • Prepare Windows paths for a JSON configuration when the path includes backslashes that must remain literal.
  • Write expected escaped text for a test that checks how a serializer handles quotes in user-facing copy.

Zero Server Uploads & Complete Privacy

Runs 100% in your browser; no data is uploaded to any server.

Notice a bug, calculation error, or outdated info?

Let us know directly so our engineering team can fix it.

Frequently Asked Questions

The output is the escaped string content. Copy it into a field that already has surrounding double quotes, or add a pair when you need a standalone JSON string. The quotes enclosing the field belong to the JSON structure.

Explore Other Tools

12 suggested tools

View all tools