Currency Amount Validator
Check whether text is a valid currency amount as you type it, right in your browser, without sending it anywhere.
Input
Output
No value
Guide
What does a valid currency amount look like?
A currency amount is a sum of money written as text: an optional currency symbol, the whole units, often in groups of three digits, and usually two decimals for the cents. Each country has its own style: a US shop writes $1,234.56, a German one 1.234,56 €, a Swiss one CHF 1'234.50 and a Swedish one 1 234,56 kr.
You check amounts when you build a price field, import a product list or bank export, or tidy up prices typed by hand.
Tool description
Type or paste an amount into the Currency amount field, and the result shows as you type: "Currency amount is valid" or "Currency amount is not valid". Spaces and line breaks around the amount are ignored.
Currency symbol starts on $. Any other symbol or code works too, such as €, kr or USD, as long as it matches exactly, capital letters included. Thousands separator starts on Comma, with Dot, Space, Apostrophe, or None for amounts without groups. Decimal separator is Dot or Comma, starting on Dot.
Require the currency symbol (off at first) makes amounts without the symbol fail. Symbol after the amount (off) moves the symbol behind the number, and Allow a space between the amount and the symbol (off) accepts one space there. Allow negative amounts (on) accepts a minus sign at the very start.
What passes with the defaults
The settings start out fitting US dollars:
- Passing:
$1,234.56,$1234.56,1,234.56,$5,$0.50,$.99and-$5.00 - Failing:
€1,234.56(another symbol),1.234,56 €(other symbol and separators),$ 1,234.56(a space),$1,234.5(one decimal),$12,34.56(a group of two),$-5.00and($5.00)(negative amounts need the minus sign in front)
For 1.234,56 €, set Currency symbol to €, Thousands separator to Dot and Decimal separator to Comma, and turn on Symbol after the amount and Allow a space between the amount and the symbol. Then -1.234,56 € passes too.
Rules that always apply
- An amount has exactly two decimals or none: three, as the Kuwaiti dinar (
KWD) uses, always fail. - Groups after the first have exactly three digits: Indian-style
1,23,456.00fails. - The whole part can't start with 0 unless it is 0:
$0.50passes,$00.50fails. - Space means an ordinary space, and Apostrophe the straight
'. The no-break space and the curly’that spreadsheets and web pages often use fail.
Good to know
- The check reads the form only: it doesn't know which symbol goes with which separators.
- To check a currency code such as
EUR, use the ISO 4217 Currency Code Validator. For plain numbers with any number of decimals, use the Decimal Number Validator.
Features
- Checks amounts with or without a currency symbol
- Any symbol or code, before or after the amount
- Comma, dot, space or apostrophe between thousands
- Results as you type, with no button to press
- Runs in your browser, so nothing you type is sent anywhere