Currency Symbol Strip to Number

Remove at most one leading or trailing Unicode currency symbol and parse an exact decimal using explicit decimal and grouping separators; embedded symbols are rejected.

Description

Currency cells combine a numeric amount with presentation symbols and locale-dependent separators.

Currency cells combine a numeric amount with presentation symbols and locale-dependent separators. Removing a symbol does not identify the currency, but explicit separator choices allow the amount to be parsed without guessing or floating-point rounding.1

Remove at most one leading or trailing Unicode currency symbol and parse an exact decimal using explicit decimal and grouping separators; embedded symbols are rejected.

When to use Currency Symbol Strip to Number

Use this tool to remove at most one leading or trailing Unicode currency symbol and parse an exact decimal using explicit decimal and grouping separators; embedded symbols are rejected.

Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.

How to use Currency Symbol Strip to Number and understand its results

  1. Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.
  2. Enter text, decimalSeparator, groupingSeparator using the field table and calculation rules, then run the tool.
  3. Read value. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
textCurrency cellstring; maximum length: 200Required
decimalSeparatorDecimal separatorstring; one of ., ,Required
groupingSeparatorGrouping separatorstring; one of , ,, ., Required

Enter one cell and distinct decimal/grouping separators. The parser removes at most one Unicode currency symbol at a boundary, including immediately after a leading sign, and trims surrounding whitespace. It accepts signed ASCII digits with an optional fractional part; groups, if used, require one-to-three leading digits and subsequent groups of three. Integer-coefficient arithmetic returns a plain decimal string with redundant zeros removed and negative zero written 0.

value = signed integer coefficient × 10^(−fractional digits), returned as canonical text

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
valueExact decimalstring
json
{
  "input": {
    "text": "€1.234,50",
    "decimalSeparator": ",",
    "groupingSeparator": "."
  },
  "output": {
    "value": "1234.5"
  }
}

Limitations and assumptions

Currency codes, embedded or multiple symbols, exponent notation, a missing integer part and an empty fractional part are errors. The result does not retain the symbol, original formatting or currency identity and does not perform conversion between currencies.

Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Extremely large text inputs are rejected. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.

Alternative or Complementary methods

Use Negative Parentheses Accounting Parser: Convert one parenthesized unsigned accounting decimal with optional boundary currency symbol into an exact negative decimal, using explicit decimal and grouping separators. For a complementary task, use Decimal Separator Dot vs Comma Detector: List decimal separator profiles compatible with all nonblank cells, allowing opposite-character thousands grouping; ambiguous values such as 1,234 keep both interpretations.

References

  1. Currency Symbol Strip to Number — tool.io

Similar or alternative tools

  • Negative Parentheses Accounting Parser

    Convert one parenthesized unsigned accounting decimal with optional boundary currency symbol into an exact negative decimal, using explicit decimal and grouping separators.

  • Decimal Separator Dot vs Comma Detector

    List decimal separator profiles compatible with all nonblank cells, allowing opposite-character thousands grouping; ambiguous values such as 1,234 keep both interpretations.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies