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

# Format Number

> Render a number as localized decimal, currency, percentage, or compact text.

**Format Number** uses the `en-US` locale and returns display text rather than
a numeric value.

## Inputs

| Input              | Type   | Required  | Description                                                 |
| ------------------ | ------ | --------- | ----------------------------------------------------------- |
| **Number**         | Number | Yes       | Value to format.                                            |
| **Format Type**    | String | Yes       | Decimal, Currency, Percentage, or Compact.                  |
| **Decimal Places** | Number | Sometimes | `0`–`20`; used by decimal, percentage, and compact formats. |
| **Currency**       | String | Sometimes | ISO currency code; appears for Currency. Defaults to USD.   |

## Output

| Output        | Type   | Description                   |
| ------------- | ------ | ----------------------------- |
| **Formatted** | String | The localized display string. |

<Tabs>
  <Tab title="Decimal">
    `1234.5` with two decimal places becomes `1,234.50`.
  </Tab>

  <Tab title="Currency">
    `1234.5` in USD becomes `$1,234.50`. Currency controls its conventional
    number of decimal places.
  </Tab>

  <Tab title="Percentage">
    The input is a ratio: `0.125` with one decimal place becomes `12.5%`.
  </Tab>

  <Tab title="Compact">`1200` with one decimal place becomes `1.2K`.</Tab>
</Tabs>
