Learn how to build a real-time currency converter in Webflow with the free Frankfurter API.
In this tutorial, Sandro, co-founder of Gemeos Webflow agency, shows you how to build a real-time currency converter in Webflow with the free Frankfurter API.
Example
| API | Cost | Rates | Supported currencies |
|---|
| Frankfurter (this tutorial) | Free, no key required | ECB, daily | 30+ major currencies |
| ExchangeRate-API | Free up to 1500/month | Hourly | 160+ currencies |
| Open Exchange Rates | Freemium | Hourly | 170+ currencies |
1. Build the structure in a Webflow Embed
Add an Embed to your page with the converter's HTML structure.
2. Add the script in Footer code
(function() {
var CURRENCIES = ['EUR','USD','GBP','CHF','CAD','AUD','JPY','AED','MAD','TND'];
var amountInput = document.getElementById('amount-input');
var fromSelect = document.getElementById('from-currency');
var toSelect = document.getElementById('to-currency');
var result = document.getElementById('converted-amount');
if (!amountInput || !fromSelect || !toSelect || !result) return;
// Populate the selects
[fromSelect, toSelect].forEach(function(sel) {
var current = sel.value;
sel.innerHTML = '';
CURRENCIES.forEach(function(c) {
var opt = document.createElement('option');
opt.value = c; opt.textContent = c;
if (c === current) opt.selected = true;
sel.appendChild(opt);
});
});
toSelect.value = 'USD';
var rates = {};
function convert() {
var amount = parseFloat(amountInput.value) || 0;
var from = fromSelect.value;
var to = toSelect.value;
if (from === to) { result.textContent = amount.toFixed(2) + ' ' + to; return; }
if (rates[from] && rates[from][to]) {
var converted = amount * rates[from][to];
result.textContent = converted.toFixed(2) + ' ' + to;
}
}
function loadRates(base) {
if (rates[base]) { convert(); return; }
result.textContent = 'Loading...';
fetch('https://api.frankfurter.dev/v1/latest?from=' + base)
.then(function(r) { return r.json(); })
.then(function(data) {
rates[base] = data.rates;
rates[base][base] = 1;
convert();
})
.catch(function() { result.textContent = 'Loading error'; });
}
amountInput.addEventListener('input', convert);
fromSelect.addEventListener('change', function() { loadRates(fromSelect.value); });
toSelect.addEventListener('change', convert);
loadRates('EUR');
})();
good to know
The Frankfurter API uses European Central Bank rates, updated daily on business days. So the rates don't change in real time, second by second. For real-time rates (trading, finance), use a paid API like Fixer.io or Open Exchange Rates. Frankfurter is ideal for informational use and price estimates.
Conclusion
A currency converter can be added to Webflow in just a few minutes, with no backend. Use cases:
- International pricing pages with automatic conversion
- E-commerce stores with customers in multiple countries
- Landing pages for services billed in foreign currencies