Free Currency Converter Widget — Embed Code for Any Website

Paste two lines of HTML to add a live currency converter to any page. No API key, no signup, no credit card — the widget pulls real exchange rates from UniRate's public endpoint the moment the page loads.

Works on WordPress, Wix, Squarespace, Webflow, Ghost, and plain HTML. Supports 170+ currencies. Used on 400+ sites.

Copy-paste embed code
<link rel="stylesheet" href="https://unirateapi.com/lander/static/css/unirate-widgets.css">
<script src="https://unirateapi.com/lander/static/js/unirate-widgets.js"></script>
<div id="unirate-converter" data-from="USD" data-to="EUR" data-amount="100"></div>
Live preview
Rendered by the snippet above — no API key required.

Copy-paste embed code

Three lines. Paste them anywhere in your HTML and the widget renders itself — no build step, no bundler, no framework.

<link rel="stylesheet" href="https://unirateapi.com/lander/static/css/unirate-widgets.css">
<script src="https://unirateapi.com/lander/static/js/unirate-widgets.js"></script>
<div id="unirate-converter" data-from="USD" data-to="EUR" data-amount="100"></div>
Rate limits
60 requests / minute / IP
Enough for any mid-traffic embed. No auth required.
Data freshness
Refreshes hourly
Aggregated from ECB, Coinbase, RBA and 9 other sources.
Bundle size
~12 KB gzipped
Self-contained CSS. Does not leak styles into your page.

Customise the default currencies and amount

Every widget is configured entirely with data-* attributes on the container <div>. The widget reads them on load; no JavaScript configuration needed.

Attribute Used by Accepted values Default
data-from converter, badge, travel Any ISO 4217 code (USD, EUR, GBP, …) USD
data-to converter, badge, travel Any ISO 4217 code EUR
data-amount converter, calculator, badge Positive decimal 100
data-base calculator, rate table Any ISO 4217 code USD
data-currencies calculator, rate table Comma-separated ISO codes (EUR,GBP,JPY) EUR,GBP,JPY,CAD,AUD
data-country VAT calculator ISO 3166-1 alpha-2 country code DE

The widget also auto-respects your site's light or dark palette via prefers-color-scheme, so you do not need to configure colours manually.

Embed on WordPress, Wix, Squarespace or plain HTML

The same three-line snippet works on every major site builder. These are the exact steps for the four most common hosts.

WP

WordPress

Edit a post or page, click the + button, and add a Custom HTML block. Paste the three-line snippet into the block and publish. No plugin required — the block keeps the markup intact without wrapping it in paragraphs.

W

Wix

In the editor, open Add Elements → Embed & Social → Embed HTML. Drag it onto the page, click Enter Code, and paste the snippet. Wix renders the widget inside an iframe, which already isolates your site's CSS.

SQ

Squarespace

Click the + insertion point, choose Code, and paste the snippet. Leave the HTML display mode selected (do not use Markdown). The widget renders instantly in the editor preview.

</>

Static HTML / Webflow / Ghost

Paste the two <link>/<script> lines in your <head> (once per page) and drop the <div id="unirate-converter"> anywhere in the body. Works with any CMS that allows raw HTML blocks.

Six widget variants

Every variant uses the same <link> and <script> tags above — only the container <div> changes.

1. Simple converter

Two-currency input with a swap button and live result. The default embed on this page.

<div id="unirate-converter" data-from="USD" data-to="EUR" data-amount="100"></div>

2. Multi-target calculator

Convert one base amount into a basket of target currencies at once.

<div id="unirate-calculator" data-base="USD"
     data-amount="100" data-currencies="EUR,GBP,JPY,CAD,AUD"></div>

3. Exchange rate table

Clean table view of one base against a set of quote currencies. Ideal for sidebars and finance pages.

<div id="unirate-table" data-base="USD"
     data-currencies="EUR,GBP,JPY,CAD,AUD,CHF"></div>

4. Inline rate badge

Compact single-line display of one pair. Drop it anywhere you need a live quote without a full form.

<div id="unirate-badge" data-from="USD" data-to="EUR" data-amount="1"></div>

5. VAT calculator

Calculates VAT / GST for 120+ countries using UniRate's tax-rate feed.

<div id="unirate-vat" data-country="DE"></div>

6. Travel budget widget

Shows how far a budget goes in the destination currency plus the local VAT rate — designed for travel blogs.

<div id="unirate-travel" data-from="USD" data-to="EUR"></div>

Frequently asked questions

Do I need an API key or signup to use the widget?

No. The widget hits UniRate's public rate endpoint directly, which is unauthenticated and rate-limited to 60 requests per minute per IP. You only need an API key if you plan to call the UniRate API from your own server.

Is the widget free for commercial use?

Yes — including paid products, client sites, SaaS apps and ad-supported media. We only ask that you keep the widget's default "Powered by UniRate" link in place; it is what allows us to keep the public endpoint free.

How many currencies does the widget support?

170+ fiat currencies and the major cryptocurrencies. See the full ISO 4217 codes reference for every code the widget accepts in data-from, data-to, data-base and data-currencies.

Can I change which currencies show by default?

Yes. Set the data-from and data-to attributes on the converter and badge, or data-base + data-currencies on the calculator and rate table. The user can then swap to any other supported currency from the dropdowns in the widget itself.

Does the widget work on WordPress?

Yes — paste the three-line snippet into a Custom HTML block, no plugin required. It works the same way on Wix (Embed HTML element), Squarespace (Code block), Webflow (Embed component), Ghost (HTML card) and any other CMS that allows raw HTML.

How often do the exchange rates update?

UniRate aggregates rates from 12 sources — ECB, Coinbase, RBA, BoC, TCMB, LBMA and others — and refreshes them hourly. The widget fetches the latest cached rate on page load, so your visitors always see a rate that is at most an hour old.

I need more than the widget can do — is there an API?

Yes. If you need historical rates, time-series data, or higher request volumes, the UniRate Forex API covers 170+ currencies with 27 years of history and code samples in cURL, Python, Node, PHP and Go. The free tier gives you 200 requests per day with no credit card.

Need more than a widget? Build with the API.

The free plan includes 200 API requests per day, real-time rates for 170+ currencies and 27 years of historical data. Same data that powers the widget — with full programmatic access.

200 requests/day free · No card required · Pro plan from $9/mo