javascript parse float with decimals code example Example: javascript convert string to float with 2 decimal places var twoPlacedFloat = parseFloat(yourString).toFixed(2)