Currency converter

Convert an amount between major world currencies using server-fetched mid-market style rates. See when rates were last updated, pick popular pairs, and fall back gracefully if the live provider is unavailable. Your API key never reaches the browser.

Currency converter

How to use the currency converter

  1. Enter the amount you want to convert.
  2. Choose from and to currencies (search by code or name).
  3. Use Swap or a popular pair chip to flip currencies quickly.
  4. Read the converted amount, unit rate, and “rates updated at” timestamp.
  5. If rates fail to load, use Retry. Stale or fallback rates are labeled clearly.

Formula & method

Rates are fetched server-side from the configured provider and cached for about one hour.

Amounts convert through the provider base (USD): amount_to = amount_from ÷ rate_from × rate_to.

If the live provider fails, the API returns the last successful rates (or a minimal bootstrap fallback) and marks them as stale.

to = from ÷ rate[from] × rate[to] (rates per 1 USD)

Worked example

Convert 100 USD to EUR when EUR = 0.90 per USD → 90 EUR.

Convert 90 EUR back to USD → 100 USD.

Cross rates (EUR→PKR) go through the USD base the same way.

Frequently asked questions

Is the exchange API key exposed to users?

No. Only the server route `/api/rates` talks to the provider. The browser receives rates JSON without secrets.

How often do rates refresh?

Responses are cached with a one-hour revalidate window. The UI shows the provider’s update timestamp when available.

What happens if the provider is down?

We serve the last known rates from memory when possible, otherwise a clearly labeled bootstrap fallback.

Are these bank mid-market rates?

They are educational mid-market style quotes from the configured provider. Banks and cards add spreads and fees.

Disclaimer

Rates are estimates for education only and are not financial advice.