Skip to content
RFrftools.io

Embed a Calculator

Put any of the 241 rftools.io calculators on your own pages, free. It runs in a frame, sized to its content, in your colours and in any of seven languages. Vendors can add a key to preload their own part values.

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.

Snippet builder

Pick a calculator and a look, then copy a snippet. Only values the embed accepts are written into it.

Script snippet — resizes to its content
<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 — fixed height
<iframe src="https://rftools.io/embed/microstrip-impedance/"
  title="Microstrip Impedance Calculator - rftools.io"
  width="100%" height="640" style="border:0" loading="lazy"></iframe>

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 or your key says otherwise. A visitor's own rftools.io theme is never used, so everyone sees your embed the same way.

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.

ParameterValuesEffectKey default
e_keyek_ and 16 lowercase letters or digitsApplies the key's presets, theme and language defaults, and attributes views and calculations 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_themelight or dark; default lightLight or dark appearance inside the frame. Without it, the key's default, else light. The visitor's own rftools.io theme is never used, so every visitor sees the same embed.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 organisation. It holds your organisation's name, 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.

To request a key, email contact@rftools.io with your organisation's name, every site the embed will run on — staging included — and any presets. List origins as https://www.example.com; a whole domain's subdomains can be listed as https://*.example.com. Adding, changing or revoking a key is a deployment, which takes minutes.

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, from the next page load after the change is deployed. 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 issued to you, 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.

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.