For AI agents: the documentation index is at /llms.txt, and this page is available as Markdown at /embed.md.
Embed face measurement widgets
11 free face measurement widgets for any website: a visitor chooses a photo, the measurement runs in their browser, and your page shows their result with a credit link to The Face Analysis. Add one with a script tag, a web component or a React component. No sign-up, no API key, free on commercial sites too.
What your visitors see
The widget is a small frame on your page. The visitor chooses a front-facing photo, waits a moment while the face is measured in their own browser, and sees their result with a link to the full tool. Three things are on your page: (1) your own content, (2) the widget, which runs in a frame, and (3) a visible credit link that is written into your page's HTML. The credit link is part of your page, not of the frame: a link inside an iframe belongs to the iframe's own document.
Widgets
tool | Widget | What it measures | Full tool |
|---|---|---|---|
face-shape | Face shape | Which of seven face shapes a front photo reads as, from the width and length of forehead, cheekbones and jaw. | /face-shape-detector |
eye-shape | Eye shape | Eye shape (almond, round, hooded, upturned or downturned), eye spacing and canthal tilt from the eye landmarks. | /eye-shape |
canthal-tilt | Canthal tilt | The angle of each eye's outer corner relative to the inner corner, in degrees, for each eye. | /canthal-tilt |
nose-shape | Nose proportions | Nose width against the face, nose length against its width, and how it compares to the classic one-eye-width canon. | /nose-shape |
lip-shape | Lip proportions | Lip fullness, the balance of upper to lower lip, the Cupid's bow and the angle of the mouth corners. | /lip-shape |
facial-thirds | Facial thirds | How the face height splits into upper, middle and lower thirds, and the middle-to-lower comparison. | /facial-thirds |
fwhr | fWHR | Facial width-to-height ratio: cheekbone width divided by the height from brow to upper lip. | /fwhr-calculator |
midface-ratio | Midface ratio | The gap between the pupils divided by the height from the pupil line to the upper lip. | /midface-ratio |
face-symmetry | Face symmetry | How closely the left and right halves of the face mirror each other, measured from paired landmarks. | /face-symmetry-test |
golden-ratio | Golden ratio | How close three facial proportions sit to the golden ratio of 1.618, as a percentage fit. | /golden-ratio-face-calculator |
pupillary-distance | Pupillary distance | The distance between the pupils in millimetres, using the iris as the ruler, with its honest error band. | /pupillary-distance |
Sizes: compact (360 px), standard (480 px), wide (720 px). The frame is as wide as its container up to that size, and its height follows its content.
Quick start
Script tag
<div data-tfa-widget="face-shape" data-size="standard"></div>
<script async src="https://thefaceanalysis.com/embed.js"></script>The script builds the iframe, keeps its height equal to its content and writes the visible credit link under it into your page. Use one div per widget; you can put several on a page. An unknown data-tfa-widget value is ignored with a console warning that lists the valid ids.
Languages
The widget and the credit sentence come in 14 languages: en (English), de (Deutsch), es (Español), fr (Français), pt-br (Português (BR)), nl (Nederlands), tr (Türkçe), it (Italiano), pl (Polski), ru (Русский), ja (日本語), ko (한국어), hi (हिन्दी), id (Bahasa Indonesia). English is the default. Add data-lang to the script version, for example data-lang="de"; the plain iframe version uses https://thefaceanalysis.com/embed/de/face-shape and the credit sentence for that language (Gesichtsanalyse von for German). Only the widget and the credit sentence are translated: thefaceanalysis.com itself is in English, so the credit link and the "full measurements" link open English pages.
Web component (npm)
npm install thefaceanalysis-embed<script type="module">import "thefaceanalysis-embed";</script>
<face-analysis-widget tool="eye-shape" size="wide"></face-analysis-widget>React
import { FaceAnalysisWidget } from "thefaceanalysis-embed/react";
<FaceAnalysisWidget tool="fwhr" size="standard" />The wrapper loads the web component on the client only, so it is safe in server-rendered apps; in Next.js use it inside a Client Component. import { TOOLS } from "thefaceanalysis-embed" lists the supported ids.
Plain iframe
For pages that do not allow scripts. Include the credit link yourself: it is part of the code and has to stay visible.
<iframe src="https://thefaceanalysis.com/embed/face-shape" title="Face shape detector by The Face Analysis" width="480" height="730" style="border:0;width:100%;max-width:480px" loading="lazy"></iframe>
<p style="text-align:center;font:12px system-ui,sans-serif">Face analysis by <a href="https://thefaceanalysis.com/face-shape" target="_blank">The Face Analysis</a></p>Replace face-shape in the address with any id from the table; point the credit link at the same tool's page (the Full tool column).
Options
| Option | Script tag | Web component / React | Values | Default |
|---|---|---|---|---|
| Which widget | data-tfa-widget | tool | face-shape, eye-shape, canthal-tilt, nose-shape, lip-shape, facial-thirds, fwhr, midface-ratio, face-symmetry, golden-ratio, pupillary-distance | face-shape |
| Size | data-size | size | compact, standard, wide | standard |
Add it to your platform
Paste the code into your platform's HTML or embed block. Platforms differ in what they keep: some remove scripts or iframes on free plans. If the script version disappears, use the plain iframe version and add the credit link as normal text; if iframes are removed too, link to the tool page. Steps below come from each platform's own help pages, and anything not verified there says so.
WordPress.com
Plan limits apply.
- Open the post or page and select the block inserter (+).
- Search for HTML and choose the Custom HTML block.
- Select Edit HTML if the block is in preview, paste the code and select Update.
Source: WordPress.com: Custom HTML block.
Wix
Plan limits apply.
- Select Add Elements, then Embed Code, then Embed HTML (or Embed a site).
- Choose Enter Code (or Enter Website Address) and paste the code or the widget address.
- Select Apply, then set the element's width and height to 100% so it is not cropped.
Source: Wix: Adding HTML code.
Squarespace
Script version works.
- Add a Code block, open its editor and set the mode to HTML, then paste the code.
- Or add an Embed block, choose Code snippet and paste the code under Embed Data.
- Save and check the page in a private window.
Source: Squarespace: Code blocks.
Google Sites
Script version works.
- Select Insert, then Embed, then Embed code.
- Paste the code and select Next, then Insert.
- Select Publish to see it: the editor does not run the widget.
Source: Google Sites: Embed.
Carrd
Script version works.
- Add an Embed element.
- Set Type to Code and Style to Inline so it renders where the element sits.
- Paste the code and publish the site: nothing shows in the builder.
Source: Carrd: Embedding custom code.
Notion
Link only.
- Type /embed and choose Embed.
- Paste the widget address, for example https://thefaceanalysis.com/embed/face-shape.
- Add the credit link as normal text under it.
Source: Notion: Embed and connect other apps.
Ghost
Check in your editor.
- Add an HTML card to the post.
- Paste the code.
- Open the published post: the editor shows only a placeholder.
Source: Ghost: Cards.
Webflow
Check in your editor. Steps not verified from official documentation.
- Add a Code Embed element inside a container.
- Paste the code and preview.
Shopify, Blogger, Weebly and others
Check in your editor. Steps not verified from official documentation.
- Look for a Custom Liquid or custom HTML block (Shopify), an HTML/JavaScript gadget or the post HTML view (Blogger), or an Embed Code element (Weebly).
- Paste the code and publish to test.
Resize messages
The widget posts its content height to the parent window so the iframe can match it. The script and the web component handle this for you; with a plain iframe you can listen yourself.
window.addEventListener("message", (e) => {
if (e.origin !== "https://thefaceanalysis.com") return;
const m = e.data;
if (m && m.source === "tfa-embed" && m.type === "resize") {
iframe.style.height = Math.ceil(m.height) + "px";
}
});How it works
The element creates an iframe to https://thefaceanalysis.com/embed/<tool>?h=<your hostname>. Only /embed/<tool> pages allow being framed (Content-Security-Policy: frame-ancestors *) and they are noindex; the rest of the site is unchanged.
Who it is for
- Hair salons and barbers. Put the face shape finder next to your cut and style guides so a client arrives knowing their shape.
- Opticians and eyewear shops. Face shape, eye spacing and pupillary distance beside your frame guides, with the honest error band shown.
- Beauty, beard and makeup blogs. Eye, lip and nose proportions turn an article about a feature into something the reader can try.
- Teachers and researchers. fWHR, facial thirds, symmetry and the golden ratio show how a measurement works and how wide the normal range is.
Privacy and what is counted
The measurement runs in the visitor's browser: the widget is free, needs no sign-up and loads its face landmark model only after a photo is chosen. The widget frame loads no analytics and sets no cookies. We only see ordinary server request logs, which include the address of the embedding page. No photo, measurement or result is sent to us.
Terms of use
- Free to use on any website, including commercial ones. No sign-up and no API key.
- Keep the credit link under the widget visible. Do not hide it, restyle it to invisibility or remove it.
- Do not alter the widget or present its reading as a medical or cosmetic diagnosis: it measures proportions in one photo.
- We may change or retire a widget. Widget use is counted per embedding site (hostname only).
Each widget measures proportions in one photo; how every number is made and what a photo cannot measure is in the methodology. Source: thefaceanalysis-embed.
Frequently asked questions
What exactly do I embed?
A small frame that runs one of our free measurement tools on your page. Your visitor chooses a photo, the measurement runs in their browser and the frame shows their result, with a link to the full tool. Your page keeps a visible credit link to The Face Analysis.
Is the widget available in my language?
Yes: the widget and the credit sentence come in 14 languages (English, Deutsch, Español, Français, Português (BR), Nederlands, Türkçe, Italiano, Polski, Русский, 日本語, 한국어, हिन्दी, Bahasa Indonesia). Add data-lang="de" to the script version, or use /embed/de/<tool> in the plain iframe version; English is the default. The text, the labels and the number format of the result are translated. This website itself stays in English, so the credit link and the full-tool link open English pages.
Does it cost anything?
No. The widgets are free to use on any website, including commercial ones, with no sign-up. The only condition is that the credit link under the widget stays visible.
What happens to my visitors' photos?
The measurement runs in the visitor's browser: the tool is free, needs no sign-up and loads its face landmark model only after a photo is chosen. We count widget use per embedding site (the hostname only); no photo, measurement or result is part of that count.
Will it slow my page down?
Barely. The script is a few kilobytes, the frame loads lazily, and the heavy measurement model downloads only when a visitor actually chooses a photo.
Can I change the colours or remove the credit link?
No. The widget has three fixed sizes (compact, standard and wide) and the credit link has to stay visible. If a platform strips the script version, use the plain iframe version and add the credit link as normal text.
Is this a medical or cosmetic tool?
No. Each widget measures proportions in one photo and says so. Angle, smile and lighting can move a borderline reading, and a result is not a diagnosis, a judgement or advice about any procedure.