If they're meant to be separate values, try this:

var values = "554,20".split(",")
var v1 = parseFloat(values[0])
var v2 = parseFloat(values[1])

If they're meant to be a single value (like in French, where one-half is written 0,5)

var value = parseFloat("554,20".replace(",", "."));
Answer from Jesse Rusak on Stack Overflow
๐ŸŒ
Reactgo
reactgo.com โ€บ home โ€บ convert the string to double in javascript
Convert the string to Double in JavaScript | Reactgo
August 18, 2022 - To convert a string to a double, we can use the built-in parseFloat() function in JavaScript.
People also ask

How to convert string to double in JS when it has spaces?
If you use Number(" 99.5 ") or parseFloat(" 99.5 "), JavaScript will trim the spaces and still return 99.5. Both functions can handle spaces before and after the number easily.
๐ŸŒ
wscubetech.com
wscubetech.com โ€บ resources โ€บ javascript โ€บ programs โ€บ string-to-double
JavaScript Program to Convert String to Double (8 Programs)
How to convert string to double in JavaScript when I read from input box?
When you read input from a text box, it comes as a string. You can use parseFloat(document.getElementById("id").value) to convert string to double in JavaScript and safely use it in calculations.
๐ŸŒ
wscubetech.com
wscubetech.com โ€บ resources โ€บ javascript โ€บ programs โ€บ string-to-double
JavaScript Program to Convert String to Double (8 Programs)
How do I convert a string to double in JS if my string is empty?
If you use Number(""), it will give 0. If you use parseFloat(""), it will give NaN. So, in JS, be careful when string is empty before conversion.
๐ŸŒ
wscubetech.com
wscubetech.com โ€บ resources โ€บ javascript โ€บ programs โ€บ string-to-double
JavaScript Program to Convert String to Double (8 Programs)
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ javascript โ€บ how-to-convert-a-currency-string-to-a-double-value-with-jquery-or-javascript
How to convert a currency string to a double value with jQuery ...
July 12, 2025 - After taking out the substring we will use the parseFloat() method to convert that string to float to a double value. To check whether the character is of numeric type or not, we use charCodeAt() method to get the Unicode value of the specified ...
๐ŸŒ
WsCube Tech
wscubetech.com โ€บ resources โ€บ javascript โ€บ programs โ€บ string-to-double
JavaScript Program to Convert String to Double (8 Programs)
October 31, 2025 - Learn how to convert a string to double in JavaScript. Explore methods like Number(), parseFloat(), Unary Plus, and more. Start learning now!
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ how-to-convert-a-currency-string-to-a-double-with-jquery-or-javascript
How to convert a currency string to a double with jQuery or JavaScript?
<!DOCTYPE html> <html> <body> <h1>Converting Currency String To Double</h1> <script> function convert(currency){ var k, temp; for(var i = 0; i < currency.length; i++){ k = currency.charCodeAt(i); if(k > 47 && k < 58){ temp = currency.substring(i); break; } } temp = temp.replace(/, /, ''); return parseFloat(temp); } var string_currency = "$2245.45"; document.write("Currency value: " + string_currency +"</br>"); var doubleValue = convert(string_currency); document.write("Double value: " +doubleValue + "</br>"); </script> </body> </html> When the script gets executed, it will generate an output consisting of the currency string value used in the script along with the conversion of the currency string to a double value displayed on the webpage. The replace() method of JavaScript will be used in this method to replace all characters?
๐ŸŒ
W3Schools
w3schools.com โ€บ jsref โ€บ jsref_parsefloat.asp
JavaScript parseFloat() Method
The parseFloat() method parses a value as a string and returns the first number. If the first character cannot be converted, NaN is returned. Leading and trailing spaces are ignored.
Find elsewhere
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ javascript-program-for-double-to-string-conversion
JavaScript Program for Double to String Conversion | GeeksforGeeks
February 23, 2024 - This process is essential when ... interfaces or data formatting tasks. ... Utilize the toString() method available for JavaScript number objects to convert the double to a string....
๐ŸŒ
DEV Community
dev.to โ€บ sanchithasr โ€บ 7-ways-to-convert-a-string-to-number-in-javascript-4l
7 ways to convert a String to Number in JavaScript - DEV Community
May 15, 2024 - In the first paragraph "If you parse the decimal number, it will be rounded off to the nearest integer value and that value is converted to string. " I think it should say "that value is converted to a number". ... You should always pass the base as second argument to parseInt. ... Funniest Blog That Make You Fit ! ... This is a really helpful article! As a beginner in JavaScript, I often find myself struggling with converting strings to numbers.
๐ŸŒ
Qt Forum
forum.qt.io โ€บ home โ€บ qt development โ€บ qml and qt quick โ€บ how to convert string to double ?
How to convert string to double ? | Qt Forum
May 9, 2014 - :) It makes no sense to do something like @ text: parseFloat("20") @ because that will convert the string "20" to a float and then convert it back to a string "20", which is the same as before obviously. there is no easy way of doing that I guess, you can maybe use a regular expression, I found this on "stackoverflow":http://stackoverflow.com/questions/2901102/how-to-print-a-number-with-commas-as-thousands-separators-in-javascript it looks like a good solution: @ function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } @ or you can do it by yourself, split the string and add commas, but the result will be the same :)
๐ŸŒ
Chris Pietschmann
pietschsoft.com โ€บ post โ€บ 2020 โ€บ 04 โ€บ 06 โ€บ javascript-convert-string-to-number
JavaScript: Convert String to Number | Chris Pietschmann
April 7, 2020 - This article shows you how to use a short hand with the + operator (the quick and easy way), as well as using the parseInt(), parseFloat(), and Number() method for parsing string values into a number. This article also explains how each of these methods of conversion works so you have a better understanding of when the appropriate time is to use each within your own application code. There exists a short hand in JavaScript for converting string values to numbers.
๐ŸŒ
Glarity
askai.glarity.app โ€บ search โ€บ How-can-I-convert-a-string-to-a-double-in-JavaScript
How can I convert a string to a double in JavaScript? - Ask and Answer - Glarity
Answer: To convert a string to a double in JavaScript, you can follow these steps: 1. **Use `parseFloat()` Method:** - The `parseFloat()` method parses a string and
๐ŸŒ
MDN Web Docs
developer.mozilla.org โ€บ en-US โ€บ docs โ€บ Web โ€บ JavaScript โ€บ Reference โ€บ Global_Objects โ€บ parseFloat
parseFloat() - JavaScript | MDN
parseFloat(3.14); parseFloat("3.14"); parseFloat(" 3.14 "); parseFloat("314e-2"); parseFloat("0.0314E+2"); parseFloat("3.14some non-digit characters"); parseFloat({ toString() { return "3.14"; }, }); ... Anecdotally, because the string NaN itself is invalid syntax as accepted by parseFloat(), passing "NaN" returns NaN as well. ... Infinity values are returned when the number is outside the double-precision 64-bit IEEE 754-2019 format range:
๐ŸŒ
Flexiple
flexiple.com โ€บ javascript โ€บ string-to-number
How to Convert a String to a Number In JavaScript - Flexiple
How to Convert a String to a Number In JavaScript Using the Number() functionHow to Convert a String to a Number In JavaScript Using the parseInt() FunctionHow to convert a string to a number in JavaScript using the parseFloat() functionHow to convert a string to a number in JavaScript using the unary plus operator (+)How to convert a string to a number in JavaScript using the bitwise NOT operator (~)How to convert a string to a number in JavaScript using the Math.floor() functionHow to convert a string to a number in JavaScript using the Math.ceil() functionHow to convert a string to a number in JavaScript using the Math.round() functionConclusion
๐ŸŒ
W3docs
w3docs.com โ€บ javascript
How to Convert String to Number in JavaScript
JavaScript provides various methods to convert a string into a number.
๐ŸŒ
UiPath Community
forum.uipath.com โ€บ help โ€บ studio
How should i convert string to the double? - Studio - UiPath Community Forum
April 18, 2022 - I am writing condition for confidence level for columns in my table. Please, Provide suggestion on that one!
๐ŸŒ
W3Schools
w3schools.com โ€บ jsref โ€บ jsref_tostring_number.asp
JavaScript Number toString() Method
The toString() method is used by JavaScript when an object needs to be displayed as a text (like in HTML), or when an object needs to be used as a string.
๐ŸŒ
Built In
builtin.com โ€บ articles โ€บ javascript-string-to-a-number
How to Convert a JavaScript String to Number | Built In
There are several situations in which youโ€™ll need to convert a JavaScript string into a number. Itโ€™s useful for comparing numerical data that comes in a string format, completing math operations on a string and more. Using parseInt() Using number() Using the unary operator (+) Using parseFloat() Using Math.floor() Multiply with number ยท Using the double tilde (~~) operator ยท