Skip to content
Embeds

Embed a Calculator

Put any of the 257 rftools.io calculators on your own pages, free. It runs in a frame, at a fixed size or as tall as its content, in your colours and in any of seven languages. Vendors can add a key to preload their own part values.

Snippet builder

Pick a calculator and how it looks, then copy a snippet. Only values the embed accepts are written into it. Free on every plan.

Layout
The whole calculator card, as on rftools.io, with its diagrams: full width, as tall as its content. The embed as it has always been.
Theme
Your key's theme, else light.
Show
Starting valuesThe calculator's defaults.
Create a key in your dashboard; once you are signed in, your keys are offered here. The preview runs without a key.
Colours, corners and font
Live preview · card, full width
<iframe src="https://rftools.io/embed/microstrip-impedance/"
  title="Microstrip Impedance Calculator - rftools.io"
  width="100%" height="640" style="border:0" loading="lazy"></iframe>

Embedding is covered by section 5 of the Terms of Use.

The compact widget

With a size, or with results only, an embed draws the compact widget: the inputs, the main results and a link to the full calculator. Here is the RF Link Budget Calculator, as it appears on someone else's page.

Compact · light · 360 × 480
Compact · dark · 360 × 480
Standard · light · 640 × 360
Standard · dark · 640 × 360

Two ways to embed

Both give the same calculator in a frame served by rftools.io, and both are covered by the same rules below.

The script snippet inserts the frame and resizes it as the calculator grows or shrinks. Its link stays in your page: it is the attribution, and what your visitors see if the calculator cannot load.

The iframe snippet needs no script on your page. Its height is fixed, so set one that fits the calculator.

Script snippet
<div data-rftools-embed data-calculator="microstrip-impedance">
  <a href="https://rftools.io/calculators/rf/microstrip-impedance/">Microstrip Impedance Calculator</a> on rftools.io
</div>
<script src="https://rftools.io/embed.js" async></script>
Iframe snippet
<iframe src="https://rftools.io/embed/microstrip-impedance/"
  title="Microstrip Impedance Calculator - rftools.io"
  width="100%" height="640" style="border:0" loading="lazy"></iframe>

The loader is /embed.js. It only builds the frame: it makes no check of your page, because a check running on your page could not be trusted.

Parameters

Add these to the frame's address (/embed/microstrip-impedance/?e_theme=light), or as data- attributes without the e_ on the script snippet (data-theme="light"). Every embed parameter starts with e_, so none can collide with a calculator input.

A value that does not match its form exactly is ignored — never passed into a style — and the key's default or the site's applies instead. A value in the address wins over the key's default, which wins over the site's.

An embed is light unless e_theme=dark, e_theme=match or your key says otherwise. A visitor's own rftools.io theme is never used.

Calculator inputs can be preset by name too: ?traceWidth=0.8 on the Microstrip Impedance Calculator starts it at 0.8 mm. An input given this way wins over a key's preset. On the script snippet, starting values go in data-inputs="traceWidth=0.8".

ParameterValuesEffectKey default
e_keyek_ and 16 lowercase letters or digitsApplies the key's settings as far as its account's plan allows: presets, theme and language defaults with every extra, the accent colour alone on a basic key, none on a plain one. Views and calculations are attributed to the key.—
e_viaiframe or scriptHow the embed was placed. Set by the script loader; recorded with each event.set by the loader
e_sizecompact (360 × 480), standard (640 × 360) or full (full width, as tall as its content)Draws the embed as the compact widget at that size: a header, the inputs, the main results and "Open full calculator". Without it (and without e_show), the embed is the whole calculator card, as before.—
e_showresultsHides the inputs and shows only the results. The starting values still come from the address and the key. Draws the compact widget, full width unless e_size sets a size.—
e_themelight, dark or match; default lightLight or dark appearance inside the frame. match follows the host page: the script snippet reads the page's own colours, and inside a frame it follows the visitor's light or dark system setting. Without it, the key's default, else light. The visitor's own rftools.io theme is never used.theme
e_accentsix hex digits, no #Accent colour: buttons, focus rings and highlights, plus a derived tint.accent
e_bgsix hex digits, no #Background of the frame and its cards.bg
e_fgsix hex digits, no #Text colour.fg
e_bordersix hex digits, no #Border colour.border
e_radiusa whole number from 0 to 24Corner radius of the card and inputs, in pixels.radius
e_fontsystem or interFont: the visitor's system font, or Inter.font
e_presetthe id of one of the key's presetsStarts from that preset instead of the key's first one. Explicit input values still win.—
e_langen, es, de, fr, ja, ko, ptThe calculator's language: labels, title and the embed's own text. Unknown values are ignored.lang

Keys and presets

A key ties an embed to your account. It holds the sites allowed to show it, theme defaults, a default language, and presets: named sets of input values, such as your laminates or parts, per calculator. A key is a public identifier, not a secret — it sits in your page source. What protects it is the allowlist below.

A keyed embed lists your presets under your labels and starts from the first, or from the one e_preset names. Inputs given explicitly in the address still win, so ?e_key=…&traceWidth=0.3 keeps your laminate and sets the trace.

How to get a key

Sign in and open Embed keys in your dashboard. Create a key there and list every site the embed will run on, staging included, as https://www.example.com; a whole domain's subdomains can be listed as https://*.example.com. Then copy its snippet, there or from the builder above. A change you save reaches every new load of the embed within a minute; nothing is deployed.

Every account can hold 1 key. For 30 days from the account's first key, that key has every extra: up to 10 sites, the theme, presets and a default language. After that it keeps one site and its accent colour for good.

The API plan keeps every extra on up to 5 keys while the subscription is in force.

A key that loses its extras never breaks the page it is on: the calculator keeps rendering in the plain rftools.io look, and a key that lists more than one site is then not locked to them. Only a key we revoke for abuse is refused everywhere. About a revoked key, email contact@rftools.io.

What the domain allowlist does, and what it does not

The allowlist is enforced by your visitors' browsers, not by the embed and not by our script. It protects the use of your key — your presets, theme and attributed counts appear only on your pages. It is not access control over the calculator.

Enforced

  • A keyed embed shows only on your pages.

    When an embed carries your key, rftools.io tells the visitor's browser which sites may frame it: exactly the origins listed for your key. On any other site the browser shows nothing — the script snippet then shows its link instead.

  • A revoked or unknown key shows nowhere.

    The frame is refused everywhere, on every page load from a minute after the revocation. Copies already open in a tab are not affected.

  • The rest of rftools.io cannot be framed.

    Every other page, this one included, may be framed only by rftools.io itself.

Not prevented

  • Keyless embeds are not prevented.

    Anyone can embed any calculator without a key, on any site. That is deliberate: it is the free embed. A keyless embed shows the calculator defaults, with no presets or theme defaults of yours.

  • Copies of the page's code are not prevented.

    The embed's HTML is public. Anyone can fetch it, copy it, or serve it through their own server, and the allowlist cannot see that. Using your key that way breaks the terms, but no header can stop it.

  • Forged analytics are not prevented.

    Nothing authenticates an analytics event. Anyone can send one naming any key or any site. The counts we report are counts, not proof.

Attribution

Every embed shows “Powered by rftools.io”, in its language, linking to the calculator's page (tagged utm_source=embed). No parameter and no key setting removes it, and there is no white-label version.

The Terms of Use make keeping the attribution, and using only a key your own account created, conditions of embedding.

What an embed records

An embed records two events: embed_view once per load, and embed_calculate each time a visitor calculates with new values (at most ten a minute). Both name the key (or none), the calculator, the embedding site's origin as the browser reports it, and whether it was placed by iframe or script.

They go to Google Analytics, and to rftools.io's own records, which keep them for 90 days with no network address and no account, so a key's counts survive blocked cookies and blocked analytics. Google Analytics runs in the frame with its default cookie settings, which browsers refuse inside a frame on another site, so it usually records nothing there; the per-key counts are rftools.io's own records. The previews on this page record nothing.

Nothing else of the site runs in an embed: no advertising, no session recording, no AI assistant, no sign-in, saving or sharing controls. See the Privacy Policy and Cookie Policy.