Embeddable unit converter widget
Put a working converter on your own site in one line of code. Configure it below, preview it live, then copy the snippet. Free for personal and commercial use — no account, no API key, no tracking.
1. Configure
Required by the licence. Keeps the widget free.
2. Preview
3. Copy the code
<div data-unitconvertlab data-category="length" data-from="centimeter" data-to="inch" data-value="1" data-theme="auto" data-height="320"></div>
<script src="https://unitconvertlab.com/embed.js" async></script><iframe
src="https://unitconvertlab.com/embed/converter?category=length&from=centimeter&to=inch&value=1&theme=auto"
title="Unit converter by UnitConvertLab"
width="100%"
height="320"
loading="lazy"
style="border:0"
scrolling="no"
></iframe>The script version listens for a height message from the widget and resizes the iframe automatically, so long unit lists never get cut off. The plain iframe is fixed-height and works anywhere scripts are blocked, including most CMS and newsletter editors.
Licence and attribution
The widget and the underlying conversion data are published under CC BY 4.0. You may embed it on commercial sites, inside client work, and behind paywalls.
Keep the attribution link visible, or credit UnitConvertLab in your page copy if your layout cannot fit it.
Prefer raw data?
Every unit and conversion factor behind this widget is published as static JSON you can fetch directly — no key, no rate limit.
Read the API docsFrequently asked questions
Is the UnitConvertLab embed free to use?
Yes. The widget is free for personal and commercial sites, with no account, API key, or usage limit. Keeping the small attribution link visible is the only condition.
Does the widget slow my page down?
No. The loader is under 2 KB and the converter loads in a lazy iframe, so it is fetched only when it scrolls near the viewport and never blocks your page render.
Will the widget match my site design?
You can choose light, dark, or automatic mode. Automatic follows the visitor's operating-system colour scheme, and the iframe background is transparent so it sits on your own page background.
Does the embed track visitors?
No. UnitConvertLab sets no cookies and runs no third-party analytics inside the widget. All conversion maths runs locally in the visitor's browser.