Free USD to CAD Converter Widget
Show the live Bank of Canada exchange rate on your own site. One line of code, no API key, no signup, no usage limits. Free for personal and commercial sites.
Quick install
Copy this snippet into your page where you want the widget to appear:
Live preview — three styles
Pick the one that fits your layout. Style is set with a single data-style attribute.
Options
| Attribute | Values | Default | What it does |
|---|---|---|---|
data-style | default / compact / dark | default | Visual variant |
data-amount | Any positive number | 100 | Pre-filled amount in USD |
How it works
- Live data: the rate comes directly from the Bank of Canada Valet API, published each business day around 16:30 ET.
- Fallback: if Bank of Canada is unreachable, the widget falls back to Frankfurter (ECB-based).
- Isolated styles: the widget renders inside a Shadow DOM, so your site's CSS never collides with the widget's.
- Lightweight: single JS file (< 5 KB gzipped), no jQuery, no React, no tracker.
- Privacy: no cookies, no analytics, no third-party calls beyond the rate API.
Multiple widgets on the same page
Place as many <div class="usd2cad-widget"> as you want — they all share the same rate fetch.
Need CAD to USD instead?
Use the matching widget at cad2usd.ca/embed/ — same install pattern, defaults to CAD→USD.
Licensing
Free to embed on any website, commercial or personal, with attribution. The "Powered by USD2CAD.ca" link inside the widget must remain visible. Custom unbranded versions are available — contact us.
FAQ
Does it work without JavaScript?
No — the widget needs JavaScript to fetch the live rate. We recommend pairing it with a static fallback rate inside a <noscript> tag if SEO on the host page matters.
Will it slow down my site?
No. The script is loaded with async, runs in < 50 ms, and the rate request happens after the page is interactive.
Can I change the colors?
The widget uses Shadow DOM so external CSS can't override it directly. For custom styling, get in touch — we maintain a paid version that exposes CSS variables.
How fresh is the rate?
It matches the Bank of Canada's most recent business-day publication, refreshed every 30 minutes server-side.
Does it work on AMP pages?
Not directly — AMP forbids arbitrary scripts. For AMP, use an <amp-iframe> pointing at /embed/iframe.html (coming soon).