Loading…

How to use Template Literal → Concat

Paste JavaScript containing backtick template literals, then click Convert. Each `...${x}...` becomes "..." + (x) + "...".

Frequently asked questions

Why convert templates to concatenation?

Concatenation runs on very old engines that lack template literal support, and some code styles or linters prefer explicit + concatenation.

Are interpolated expressions preserved?

Yes. Each ${expression} becomes the same expression wrapped in parentheses, so operator precedence around the concatenation stays correct.

What is not converted?

Tagged templates like tag`...` are left untouched because their semantics differ, and template literals inside strings, comments or regex are ignored.

More JavaScript Tools

Ternary to If/Else
Expand ternary assignments, declarations and returns into readable if/else blocks, safely skipping ?? and ?. operators
List to JS Array
Turn a list of lines, comma or space separated values into a JavaScript array literal with quoting, trimming and de-duplication
JS Variable Name Validator
Check whether a name is a valid JavaScript identifier and explain each problem — digits, symbols, spaces or reserved keywords
JS Quote Normalizer
Convert JavaScript string quotes between single and double, string, comment and regex aware, re-escaping quotes as needed
JSON Key Sorter
Recursively sort the keys of a JSON object alphabetically (ascending or descending) with configurable indentation
var to let / const
Replace the var keyword with let or const across your code, string, comment and regex aware so text like \
JavaScript Formatter
Beautify and format JavaScript code with proper indentation and structure for better readability
JavaScript Minifier
Minify JavaScript by removing whitespace, comments, and shortening variable names to reduce file size
JavaScript Validator
Validate JavaScript syntax and find errors with detailed line numbers and error messages
JSON to JS Object
Convert JSON data to JavaScript object literal syntax with proper formatting and structure
JS Object to JSON
Convert JavaScript object literals to valid JSON format with proper escaping and structure
Console.log Remover
Strip console.log, warn, error, info and debug statements from JavaScript without touching strings, comments or regex

← View all JavaScript ToolsBrowse all 1,100+ tools →