This tool converts single quotes in your code into double quotes. It processes your input code and replaces single quotes according to the chosen conversion mode. You can choose a basic conversion (replace every single quote), convert only unescaped single quotes (ignoring those preceded by a backslash), convert only single quotes that delimit string literals, or apply a custom format to each conversion. Simply enter your code, select the conversion mode below, and click the process button.
Examples:
Basic Conversion
Converts every single quote to a double quote.
const greeting = 'Hello world';
const greeting = "Hello world";
Unescaped Conversion
Converts only unescaped single quotes, leaving escaped ones intact.
const contraction = 'Don\'t worry, be happy';
const contraction = "Don't worry, be happy";
Delimited Quotes Conversion
Converts only those single quotes that form complete string delimiters.
let path = '/usr/local/bin';
let path = "/usr/local/bin";
Custom Format Conversion
Converts single-quoted string literals and wraps the converted result in a custom format.
const message = 'Custom';
const message = [Converted: "Custom"];