---
source: https://carbone.io/documentation/design/formatters/currency.html
title: "Carbone Currency Formatting"
description: "List of functions to manipulate and transform your JSON prices"
generated_at: "2026-07-13"
---

# Currency Formatting

List of functions to manipulate and transform your JSON prices  
COMMUNITY FEATURE Available for:  
✓ Carbone Cloud  
✓ Carbone On-premise  
✓ Embedded Carbone JS   v2.0+ 

## :formatC(precisionOrFormat, targetCurrency)

v1.2.0+

| Params | Description | Type |
| --- | --- | --- |
| precisionOrFormat | \[optional\] Number of decimals, or specific format   \- Integer : change default precision of the currency   \- M : print Major currency name without the number   \- L : prints number with currency symbol (by default)   \- LL : prints number with Major currency name | Number |
| targetCurrency | \[optional\] target currency code (upper case). Ex: USD, EUR, ... It overwrites the global option `options.currencyTarget` | String |

_Examples_

```javascript
// With API options: {
//   "lang": "en-us",
//   "currency": {
//     "source": "EUR",
//     "target": "USD",
//     "rates": {
//       "EUR": 1,
//       "USD": 2
//     }
//   }
// }
{d.value:formatC()} // input: "1000.456" → output: "$2,000.91"
{d.value:formatC('M')} // input: "1000.456" → output: "dollars"
{d.value:formatC('M')} // input: "1" → output: "dollar"
{d.value:formatC('L')} // input: "1000" → output: "$2,000.00"
{d.value:formatC('LL')} // input: "1000" → output: "2,000.00 dollars"
// With API options: {
//   "lang": "fr-fr",
//   "currency": {
//     "source": "EUR",
//     "target": "USD",
//     "rates": {
//       "EUR": 1,
//       "USD": 2
//     }
//   }
// }
{d.value:formatC()} // input: "1000.456" → output: "2 000,91 $"
// With API options: {
//   "lang": "fr-fr",
//   "currency": {
//     "source": "EUR",
//     "target": "EUR",
//     "rates": {
//       "EUR": 1,
//       "USD": 2
//     }
//   }
// }
{d.value:formatC()} // input: "1000.456" → output: "1 000,46 €"
```

## :convCurr(target, source)

v1.2.0+

Convert from one currency to another

Exchange rates are included by default in Carbone but you can provide a new exchange rate  
for one report in `options.currencyRates` of `Carbone.render` or globally with `Carbone.set`

`convCurr()` without parameters converts automatically from `options.currencySource` to `options.currencyTarget`.

If `options.currencySource` is undefined, no conversion will be performed.

| Params | Description | Type |
| --- | --- | --- |
| target | \[optional\] convert to this currency ('EUR'). By default it equals `options.currencyTarget` | String |
| source | \[optional\] currency of source data ('USD'). By default it equals `options.currencySource` | String |

_Examples_

```javascript
// With API options: {
//   "currency": {
//     "source": "EUR",
//     "target": "USD",
//     "rates": {
//       "EUR": 1,
//       "USD": 2
//     }
//   }
// }
{d.value:convCurr()} // input: 10 → output: 20
{d.value:convCurr()} // input: 1000 → output: 2000
{d.value:convCurr('EUR')} // input: 1000 → output: 1000
{d.value:convCurr('USD')} // input: 1000 → output: 2000
{d.value:convCurr('USD', 'USD')} // input: 1000 → output: 1000
```

Get inspired by one of our real-life examples: [Ticket](/examples/ticket/index.md), [Invoice](/examples/invoice-simple/index.md) or [Bank statement](/examples/bank-statement-expert/index.md)

## Related topics

- [Text Formatting](/documentation/design/formatters/text.md)
- [How formatters work](/documentation/design/formatters/overview.md)
- [Number Formatting](/documentation/design/formatters/number.md)
- [Interval and Duration](/documentation/design/formatters/interval.md)
- [Date Formatting](/documentation/design/formatters/date.md)
- [Array manipulation](/documentation/design/formatters/array.md)
