> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reelevant.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Format Currency

> Format a number as currency

## Overview

The `format-currency` transformation formats a number as a currency value using the specified currency code and locale.

## Syntax

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
format-currency(<variable>, currency="EUR")
```

## Parameters

| Parameter    | Type   | Required | Description                                                                   |
| ------------ | ------ | -------- | ----------------------------------------------------------------------------- |
| `variable`   | number | Yes      | The number to format as currency                                              |
| `currency`   | string | Yes      | The currency code (e.g., `"EUR"`, `"USD"`, `"GBP"`)                           |
| `locale`     | string | No       | The locale for formatting (e.g., `"en-US"`, `"fr-FR"`). Defaults to `"en-US"` |
| `minDecimal` | number | No       | Minimum number of decimal places                                              |
| `maxDecimal` | number | No       | Maximum number of decimal places                                              |

## Examples

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
format-currency(<variable>, currency="EUR")
format-currency(<variable>, currency="USD", locale="en-US")
format-currency(<variable>, currency="EUR", locale="fr-FR", minDecimal=2, maxDecimal=2)
```

<Info>
  For formatting with a locale from a variable, see [Format Currency with Locale Variable](/advanced-guide/transformations/format-currency-locale).
  For formatting with both locale and currency from variables, see [Format Currency with Locale and Currency Variables](/advanced-guide/transformations/format-currency-locale-currency).
</Info>
