How to Build a Real-Time Currency Converter in Webflow
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');
})();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
Lorem ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.














