Use Single Quotes in JSON

Use Single Quotes in JSON to convert valid double-quoted JSON into a single-quoted version. Instant formatting, copy, and export in-browser.

Paste your input above or import a file below.
No file chosen
Supported file types: .txt, .csv, .tsv, .log, .json, .xml, .md, .ini, .yaml, .yml, .html, .htm, .css
Total characters: 0

How to Use:

Paste your JSON into the input box on the left, or use the “Choose File” button to import it. Once loaded, the tool parses your input and swaps out all double quotes with single quotes even inside strings. The updated result appears on the right with a live character count. You can copy the output, export it to a file, or click “Clear All” to reset the tool and try something else.

What Use Single Quotes in JSON can do:

Use Single Quotes in JSON helps you convert JSON for environments that prefer or allow single quotes, like some template engines or JavaScript snippets embedded in HTML. It keeps the structure intact but replaces double quotes on keys and values with singles. Escaped quotes are handled carefully to avoid breaking your strings. You still get clean formatting and valid content, just with swapped quote styles.

Example:

Input:

{
"name": "Alice",
"message": "She said: \"Hello\""
}

Output:

{
'name': 'Alice',
'message': 'She said: \'Hello\''
}

Common Use Cases:

Use this tool when you’re embedding JSON into HTML attributes, converting it for custom config formats, or just matching stylistic preferences. It’s especially handy for templating, injecting data into JS code safely, or working in systems that escape double quotes aggressively. Fast, client-side, no setup needed.

Useful Tools & Suggestions:

When double quotes get in the way, they can be swapped out by using Convert JSON to YAML, since YAML relies on indentation and often prefers single quotes. Then, if the structure needs a visual once-over, Highlight JSON Syntax can be applied to make the format easier to read.