There is no way to pass parameter to toLocaleString and remove currency symbol. so use this function instead.

var convertedNumber = num.toLocaleString('de-DE', { minimumFractionDigits: 2 });

Answer from Shahzaib Hayat Khan on Stack Overflow
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Number › toLocaleString
Number.prototype.toLocaleString() - JavaScript | MDN
The toLocaleString() method of Number values returns a string with a language-sensitive representation of this number. In implementations with Intl.NumberFormat API support, this method delegates to Intl.NumberFormat.
🌐
W3Schools
w3schools.com › jsref › jsref_tolocalestring_number.asp
W3Schools.com
let num = 1000000; let text = num.toLocaleString("fi-FI"); Try it Yourself » · Format a number into a currency string, using the locale specific of USA: let num = 1000000; let text = num.toLocaleString("en-US", {style:"currency", currency:"USD"}); Try it Yourself » ·
Top answer
1 of 15
29

There is no way to pass parameter to toLocaleString and remove currency symbol. so use this function instead.

var convertedNumber = num.toLocaleString('de-DE', { minimumFractionDigits: 2 });

2 of 15
18

Here how I solved this issue. When I want to format currency without any signs, I format it with the currency code and then just remove 3-chars code from the result.

export function getCurrencyFormatWithSymbol(currencyCode) {
  return {
    style: 'currency',
    currency: currencyCode,
    currencyDisplay: 'symbol',
  }
}

export function getCurrencyFormatWithIsoCode(currencyCode) {
  return {
    style: 'currency',
    currency: currencyCode,
    currencyDisplay: 'code',
  }
}

export function getCurrencyFormatWithLocalName(currencyCode) {
  return {
    style: 'currency',
    currency: currencyCode,
    currencyDisplay: 'name',
  }
}

export function getCurrencyFormatNumbersOnly(currencyCode) {
  return {
    style: 'currency',
    currency: currencyCode,
    currencyDisplay: 'none',
  }
}

export function formatCurrency (value, format, lang) {
  const stripSymbols = (format.currencyDisplay === 'none')
  const localFormat = stripSymbols ? {...format, currencyDisplay: 'code'} : format
  let result = Intl.NumberFormat(lang, localFormat).format(value)
  if (stripSymbols) {
    result = result.replace(/[a-z]{3}/i, "").trim()
  }
  return result
}

Usage:

const format = getCurrencyFormatNumbersOnly('JPY')
formatCurrency(12345, format, 'ja')
formatCurrency(123456, format, 'ja')
formatCurrency(1234567, format, 'ja')
formatCurrency(12345678, format, 'ja')

Edit: The only minus, in this case, is the speed. On simple tasks, it will work perfectly. But if you are going to format a lot of numbers (for example, if you are fetching financial reports with raw data from backend and then format numbers according to user settings) this function can slow down your algorithms significantly and become a bottleneck on some browsers. So, test it carefully before using in production.

🌐
Josh McArthur
joshmcarthur.com › til › 2018 › 04 › 11 › til-tolocalestring.html
TIL: toLocaleString() for currency formatting - Notes: Josh McArthur
April 11, 2018 - var roundNumber = 1234.0; var fractionalNumber = 1234.5678; var options = { style: "currency", currency: "NZD", minimumFractionDigits: 0, maximumFractionDigits: 3 }; console.log(roundNumber.toLocaleString(undefined, options)) // => $1,234 console.log(fractionalNumber.toLocaleString(undefined, options)); // => $1,234.568
🌐
TechOnTheNet
techonthenet.com › js › number_tolocalestring.php
JavaScript: Number toLocaleString() method
This JavaScript tutorial explains ... toLocaleString() is a Number method that is used to convert a number into a locale-specific numeric representation of the number (rounding the result where necessary) and return its value as a string....
🌐
LogRocket
blog.logrocket.com › home › the complete guide to tolocalestring in node.js
The complete guide to toLocaleString in Node.js - LogRocket Blog
June 4, 2024 - With the toLocaleString method, you can format numbers as currencies using the convention of the language you pass as the first argument.
🌐
Reddit
reddit.com › r/javascript › tip: .tolocalestring() is a great way to format currency
Tip: .toLocaleString() is a great way to format currency : r/javascript
February 23, 2018 - Which is why there are separate configurations for locale and for the currency. Consider: > 100.42 .toLocaleString('en-US', {style: 'currency', currency: 'USD'}) < "$100.42"
Find elsewhere
🌐
Vultr Docs
docs.vultr.com › javascript › standard-library › Number › toLocaleString
JavaScript Number toLocaleString() - Localize Numeric Strings | Vultr Docs
September 27, 2024 - The toLocaleString() method in JavaScript is a powerful tool for formatting numbers based on different locale conventions. By mastering this method, you can ensure that your web applications cater to a global audience with numbers presented ...
🌐
DigitalOcean
digitalocean.com › community › tutorials › js-using-tolocalestring
Using toLocaleString with Numbers, Arrays or Dates in ...
November 11, 2019 - const number = 12345.678; console.log(number.toLocaleString('en-US')); // 12,345.678 console.log(number.toLocaleString('fr-FR')); // 12 345,678 console.log(number.toLocaleString('en-US', { style: 'currency', currency: 'USD' // With currency, the currency code is also required })); // $12,345.68 console.log(number.toLocaleString('hi-IN', { style: 'currency', currency: 'INR' })); // ₹12,345.68 console.log(number.toLocaleString('en-US', { style: 'currency', currency: 'USD', maximumSignificantDigits: 2 })); // $12,000
🌐
ServiceNow Community
servicenow.com › community › developer-forum › having-an-issue-with-number-tolocalestring-with-optional › m-p › 1595546
Solved: Having an issue with Number.toLocaleString() with ... - ServiceNow Community
May 17, 2022 - function onChange(control, oldValue, newValue, isLoading, isTemplate) { if (isLoading || newValue === '') { return; } var num = new Number(g_form.getValue('<your_field>')), sd = g_form.getValue('short_description'), result = num.toLocaleString("en-US", { style: "currency", currency: "USD" }); g_form.setValue('short_description', sd + ' ## ' + result); }
🌐
W3Schools
w3schools.com › jsref › tryit.asp
W3Schools online HTML editor
The W3Schools online code editor allows you to edit code and view the result in your browser
🌐
Mzntech
mzntech.com › edu › jsref › jsref_tolocalestring_number.asp
W3Schools
let num = 1000000; let text = num.toLocaleString("fi-FI"); Try it Yourself » · Format a number into a currency string, using the locale specific of USA: let num = 1000000; let text = num.toLocaleString("en-US", {style:"currency", currency:"USD"}); Try it Yourself » ·
🌐
Our Code World
ourcodeworld.com › articles › read › 1269 › how-to-format-a-number-as-a-currency-string-using-javascript
How to format a number as a currency string using JavaScript | Our Code World
March 21, 2021 - // "$12,345.25" (12345.25).toLocaleString("en-US", { style: "currency", currency: "USD" }); // 12.345,25 € (12345.25).toLocaleString("de-DE", { style: "currency", currency: "EUR" }); // £12,345.25 (12345.25).toLocaleString("en-GB", { style: "currency", currency: "GBP" }); // $ 12.345,25 (12345.25).toLocaleString("es-CO", { style: "currency", currency: "COP" });
🌐
Simplificator
til.simplificator.com › posts › 67
Today I Learned
8.95.toLocaleString("en", { style: "currency", currency: "CHF" }) // "CHF 8.95" Number(2000).toLocaleString("en", { style: "currency", currency: "CHF" }) // "CHF 2,000.00" Number(2000).toLocaleString("en", { style: "currency", currency: "CHF", minimumFractionDigits: 0 }) // "CHF 2,000"
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Object › toLocaleString
Object.prototype.toLocaleString() - JavaScript | MDN
July 20, 2025 - const testArray = [4, 7, 10]; const euroPrices = testArray.toLocaleString("fr", { style: "currency", currency: "EUR", }); // "4,00 €,7,00 €,10,00 €" Date.prototype.toLocaleString() is used to print out date displays more suitable for specific locales. For example: js ·