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

Follow these steps to convert string data into JSON. Each step uses the actual buttons and panels on this page.

1

Paste String or Upload File

Paste your string into the left Input panel, or click Upload to load a .json or .txt file. Click Sample to see examples. The tool handles escaped JSON strings, JSON.stringify output, or text that should be parsed as JSON. 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.

2

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.

3

Copy, Minify, or Download

Click Copy to copy the JSON to your clipboard. Click Minify to compress it. Click Download to save as a file. Use Clear on the input panel to start over. All processing runs in your browser.

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

String conversion is just one JSON task. Here are other tools that work well together: