Another approach :

NumberFormat format = NumberFormat.getCurrencyInstance();
format.setMaximumFractionDigits(0);
format.setCurrency(Currency.getInstance("EUR"));

format.format(1000000);

This way, it's displaying 1 000 000 € or 1,000,000 €, depending on device currency's display settings

Answer from Thomas Mary on Stack Overflow
🌐
Medium
medium.com › @jecky999 › formatting-currency-in-kotlin-locale-aware-approach-for-global-apps-1a4038a4489d
Formatting Currency in Kotlin: Locale-Aware Approach for Global Apps | by Jaykishan Sewak | Medium
May 9, 2025 - Each country represents currencies differently. For example: ... The same becomes 123 456,78 € in France. It becomes ₹1,23,456.78 in India, using the lakh/crore system. This makes it critical to format numbers based on the user’s locale. ... Mobile Lead | Android Tech Lead at HSBC | Flutter | MVVM | JetPack Compose | kotlin | Medium blog writer | GitHub Contributor
🌐
Android Developers
developer.android.com › api reference › numberformat
NumberFormat | API reference | Android Developers
Skip to main content · English · Deutsch · Español – América Latina · Français · Indonesia · Polski · Português – Brasil · Tiếng Việt · 中文 – 简体
🌐
Kotlinlang
slack-chats.kotlinlang.org › t › 19613454 › hi-there-is-there-any-kmm-lib-for-currency-formatting-in-a-l
Hi there is there any KMM lib for currency formatting in a l kotlinlang #multiplatform
iosMain import platform.Foundation.NSLocale import platform.Foundation.NSNumber import platform.Foundation.NSNumberFormatter import platform.Foundation.NSNumberFormatterCurrencyStyle private val formatter = NSNumberFormatter().apply { locale = NSLocale(localeIdentifier = "DE") currencyCode = "eur" numberStyle = NSNumberFormatterCurrencyStyle } actual fun parseFormattedStringToCents(formattedAmount: String): BigInteger { return BigInteger(formatter.numberFromString(formattedAmount)?.longValue ?: 0L) } actual fun formatMoney(amount: Double): String { val number = NSNumber(amount) return formatte
🌐
GeeksforGeeks
geeksforgeeks.org › how-to-use-getcurrencyinstance-method-in-android
How to Use getCurrencyInstance Method in Android? - GeeksforGeeks
August 30, 2021 - For ex: getNumberInstance() is used to find an integer number format, getPercentInstance() is used for showing the number is percentage, like 0.53 to 53% and getCurrencyInstance to get currency format.
🌐
Kotlin
kotlinlang.org › docs › multiplatform › compose-regional-format.html
Manage regional formats | Kotlin Multiplatform Documentation
The local currency symbol can be placed either before or after the digits: $5,001 in en-US and 5.001,00 € in fr-FR. These regional formats work out of the box for both system locales and custom locale overrides defined in your app.
🌐
Kodejava
kodejava.org › how-do-i-format-a-number-as-currency-string
How do I format a number as currency string? - Learn Java by Examples
May 28, 2023 - For this purpose you can use the NumberFormat.getCurrencyInstance() method and pass the correct Locale to get the currency format that you want. package org.kodejava.text; import java.text.NumberFormat; import java.util.Locale; public class…
🌐
GitHub
gist.github.com › IhwanID › c451a6d0112ce2fbda0e9cb7475389f4
Format Rupiah dengan kotlin · GitHub
fun String.toCurrencyFormat(): String { val localeID = Locale("in", "ID") val doubleValue = this.toDoubleOrNull() ?: return this val numberFormat = NumberFormat.getCurrencyInstance(localeID) numberFormat.minimumFractionDigits = 0 return numberFormat.format(doubleValue) }
Find elsewhere
🌐
Cash App Code Blog
code.cash.app › kotlin-multiplatform-money-formatter
Kotlin Multiplatform Money Formatter | Cash App Code Blog
June 6, 2023 - First, we call platform-specific code for localized number formatting (e.g., NSNumberFormatter on iOS, the ICU library built into Android). Then we apply some Cash App specific adjustments in common Kotlin code. Leaning on native platform logic means we don’t have to become experts in each locale and keep the library lightweight. Another challenge was handling scale and precision. 32-bit integers might not be large enough to display amounts in some currencies while floating point numbers can introduce subtle rounding errors for fractional amounts.
🌐
Styling Android
blog.stylingandroid.com › currency-curiosities
Currency Curiosities – Styling Android
November 27, 2017 - When we change the currency of the NumberFormat instance it does not change the locale, but when we come to format a currency using that configuration it is context aware enough to format the given currency in a way that it is given any necessary context for the locale from which the NumberFormat instance was obtained.
🌐
Sling Academy
slingacademy.com › article › formatting-numbers-for-display-in-kotlin-currency-percentages
Formatting Numbers for Display in Kotlin (Currency, Percentages) - Sling Academy
import java.text.NumberFormat fun ... data. By using these formatting capabilities, Kotlin developers can ensure that currency and percentage values are human-readable and contextually appropriate for any locale....
🌐
Kotlinlang
slack-chats.kotlinlang.org › t › 474624 › i-m-trying-to-convert-a-long-amount-in-euro-cents-to-a-reada
I m trying to convert a long amount in euro cents to a reada kotlinlang #getting-started
fun Long.centsToString(): String { val format = NumberFormat.getCurrencyInstance(Locale.ITALY) format.maximumFractionDigits = 2 format.currency = Currency.getInstance("EUR") return format.format(BigDecimal(this).divide(BigDecimal(100.0))) }
🌐
Baeldung
baeldung.com › home › kotlin › kotlin numbers › number formatting in kotlin
Number Formatting in Kotlin | Baeldung on Kotlin
March 26, 2025 - In this article, we’ve addressed three ways to format decimal numbers in Kotlin.
🌐
Kotlinlang
slack-chats.kotlinlang.org › t › 10062891 › hey-we-need-to-format-prices-in-local-currencies-in-our-kmm-
Hey We need to format prices in local currencies in our kmm kotlinlang #multiplatform
fluid-currency just has the mapping of all the currency codes with the name and doesn't support any formatting so this is not much useful in this context. Is there any latest lib? ... https://kotlinlang.slack.com/archives/C3PQML5NU/p1742498505316619?thread_ts=1742424885.673259&cid=C3PQML5NU