String To JSON
Convert strings to JSON format easily
Input
Output
What is String to JSON Converter?
Got JSON that's stuck as a string? We've all been there – escaped strings, stringified JSON, or text that needs to become actual JSON. This tool converts all that string data into proper JSON (JavaScript Object Notation) format.
Here's what it accepts. A JSON string literal holding JSON, which is what you get when something calls JSON.stringify twice: "{\"sku\":\"SKU-101\"}". Escaped JSON without the outer quotes, as it shows up in log lines: {\"sku\":\"SKU-101\"}. And a single-quoted JavaScript string such as '{"sku":"SKU-101"}'. Each one is unescaped, parsed under the RFC 8259 JSON specification, and pretty-printed. Plain JSON works too. MDN's JSON.parse page covers the escaping rules if you want the details.
Everything happens in your browser, so your strings never leave your computer. One honest limit: it unwraps one level of quoting. If something was stringified three times, run the output through again.
How to Use String to JSON
Paste the escaped text, check the parsed result on the right, then copy or save it. There is no button to press in between; the output refreshes as you type.
Paste String or Upload File
Paste the string into the left Input panel: a JSON.stringify result with its outer quotes, an escaped fragment cut from a log line, or a single-quoted JS literal. Upload takes a .json or .txt file, but the file has to parse as JSON on its own (a quoted string counts), so paste raw log text rather than uploading it. Sample loads a double-encoded subscribers payload. Example input:
"{\"subscriberId\":\"SUB-1001\",\"plan\":\"Unlimited 5G\"}"If the text can't be turned into JSON, you'll see "Invalid JSON:" with the parser's message. If the string holds broken JSON, the message says so.
View Converted JSON
The right Output panel shows the parsed JSON with 2-space indentation. Escaped characters are unescaped, and the structure is validated per RFC 8259. Both panels use syntax highlighting.
Copy, Minify, or Download
Copy grabs the decoded JSON, Minify folds it back onto one line (without the extra layer of quoting), and Download saves it as formatted.json. Clear on the input side empties both panels. The unescaping is done by JavaScript in this tab.
When You'd Actually Use This
API Development
Convert stringified JSON from API responses back into JSON objects. Essential when APIs return JSON as strings instead of objects.
Database Queries
A database text column holds JSON, and your SQL client shows it escaped and quoted. Paste the value here to get the real document back.
Escaped Strings
Log lines often contain JSON with every quote escaped, like payload={\"orderId\":\"ORD-7421\"}. Copy the part from the first brace and paste it; the escaping is undone for you.
Data Processing
Process string data into JSON format for further manipulation. Essential step in data pipelines and ETL processes.
Common Questions
Is my string data stored?
No. String conversion happens entirely in your browser using JavaScript. Your data never leaves your computer.
What types of strings can it convert?
Three shapes: a double-quoted JSON string whose content is JSON (JSON.stringify output), escaped JSON without the outer quotes (from a log line), and a single-quoted JavaScript string literal. Plain JSON passes through and gets formatted. Template literals, string concatenation and other JavaScript code aren't supported.
Does it handle escaped characters?
Yes. \n, \t, \", \\ and \uXXXX sequences are unescaped as part of parsing the string, the same way JSON.parse does it.
What if the string isn't valid JSON?
You'll see "Invalid JSON:" with the parser's error message. If the quoted string itself parsed but the JSON inside it is broken (say, a trailing comma), the message tells you that, along with the position inside the string.
Can I minify the output?
Yes. Click the "Minify" button to compress the JSON output. Useful for reducing file size or for use in production environments.
What's the difference from JSON Parser?
The JSON Parser expects JSON as-is and shows it as a table. This page is for JSON that's been wrapped up as a string first: stringified, escaped, or quoted. It unwraps it and gives you formatted JSON.
Other JSON Tools You Might Need
Once the string is real JSON again, you might want to escape it back, check it or reshape it: