Skip to main content
Number formatting helpers display numbers in human-readable formats.

formatNumber

Formats a number with thousands separators and decimal places.
Examples:
Output: 1,234,567.00
Output: 1,234,567
Output: 1.234.567,89

currency

Formats a number as currency with proper symbol and locale.
Examples:
Output: $1,234.56
Output: €1,234.56
Output: £1,234.56
Output: ¥1,235 (JPY has no decimals)
Output: 1.234,56 €

Supported Currency Codes

Common currency codes include:

percentage

Calculates and formats a percentage.
Examples:
Output: 75.0%
Output: 33.33%

formatBytes

Formats bytes into human-readable file sizes.
Examples:
Output: 0 Bytes
Output: 1 KB
Output: 1.46 MB
Output: 1 GB

ordinal

Adds ordinal suffix to a number (1st, 2nd, 3rd, etc.).
Output: 1st, 2nd, 3rd, 4th Examples:
Use cases:

Practical Examples

Invoice Line Items

File Information

Progress Report

Leaderboard

Multi-Currency Invoice