fixmint
EN

Free widgets for your website

Calculators, clocks and counters you paste into any page. One snippet each, no library, and nothing loads from fixmint.

Colour
Theme

Money

Loan payment

Monthly payment and total interest from amount, rate and years.

4.5 KB, no dependenciesFull tool
Show the code
<!-- fixmint widget: Loan calculator. Free to use and change: https://fixmint.cc/widgets -->
<div class="fmw fmw-loan" data-theme="light" style="--fmw-accent:#0D795A;--fmw-on:#fff" data-currency="">
  <p class="fmw-t">Monthly loan payment</p>
  <div class="fmw-g">
    <label>Amount<input type="number" inputmode="decimal" min="0" value="25000" name="amount"></label>
    <label>Interest % a year<input type="number" inputmode="decimal" min="0" step="0.1" value="6.5" name="rate"></label>
    <label>Years<input type="number" inputmode="numeric" min="1" value="5" name="years"></label>
  </div>
  <div class="fmw-out" aria-live="polite">
    <span class="fmw-sub">You pay each month</span>
    <output class="fmw-big">–</output>
    <span class="fmw-sub">Total interest <b data-interest>–</b></span>
  </div>
  <a class="fmw-by" href="https://fixmint.cc/loan-calculator">Loan calculator by fixmint</a>
</div>
<style>
.fmw{--fmw-accent:#0D795A;--fmw-on:#fff;--fmw-bg:#fff;--fmw-fg:#22191D;--fmw-mute:#6A5E63;--fmw-line:#dbe3df;--fmw-field:#f3f6f4;--fmw-hi:var(--fmw-fg);--fmw-hi:color-mix(in srgb,var(--fmw-accent) 42%,#111);box-sizing:border-box;width:100%;max-width:440px;min-width:0;padding:clamp(12px,5%,20px);border:1px solid var(--fmw-line);border-radius:16px;background:var(--fmw-bg);color:var(--fmw-fg);font:inherit;line-height:1.45;text-align:left;overflow-wrap:anywhere}
.fmw[data-theme=dark]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}
@media (prefers-color-scheme:dark){.fmw[data-theme=auto]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}}
@supports not (color:color-mix(in srgb,#000,#fff)){.fmw{--fmw-hi:var(--fmw-fg)}}
.fmw *{box-sizing:border-box;min-width:0}
.fmw-t{margin:0 0 14px;font-size:1.05em;font-weight:700}
.fmw label{display:grid;gap:5px;font-size:.85em;color:var(--fmw-mute)}
.fmw input,.fmw select,.fmw textarea,.fmw button{font:inherit}
.fmw input,.fmw select,.fmw textarea{width:100%;min-height:44px;padding:9px 11px;border:1px solid var(--fmw-line);border-radius:10px;background:var(--fmw-field);color:var(--fmw-fg);font-size:1rem}
.fmw input[type=checkbox]{width:18px;height:18px;min-height:0;padding:0;accent-color:var(--fmw-accent)}
.fmw input[type=range]{min-height:28px;padding:0;border:0;background:none;accent-color:var(--fmw-accent)}
.fmw :focus-visible{outline:2px solid var(--fmw-fg);outline-offset:2px}
.fmw-g{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,110px),1fr));gap:10px}
.fmw-out{display:grid;gap:2px;margin-top:16px;padding:14px 16px;border-radius:12px;background:var(--fmw-field);background:color-mix(in srgb,var(--fmw-accent) 9%,var(--fmw-bg))}
.fmw-big{font-size:2em;font-weight:800;line-height:1.15;letter-spacing:-.02em;color:var(--fmw-hi);font-variant-numeric:tabular-nums}
.fmw-sub{font-size:.85em;color:var(--fmw-mute)}
.fmw-sub b{color:var(--fmw-fg);font-variant-numeric:tabular-nums}
.fmw-btn{min-height:44px;padding:0 16px;border:1px solid transparent;border-radius:10px;background:var(--fmw-accent);color:var(--fmw-on);font-weight:700;cursor:pointer}
.fmw-btn:hover{text-decoration:underline;text-underline-offset:.18em}
.fmw-ghost{border-color:var(--fmw-line);background:transparent;color:var(--fmw-fg)}
.fmw-by{display:inline-block;margin-top:14px;font-size:.75em;color:var(--fmw-mute);text-decoration:none}
.fmw-by:hover{text-decoration:underline}
</style>
<script>
(() => {
  for (const w of document.querySelectorAll('.fmw-loan:not([data-ready])')) {
    w.dataset.ready = '';
    const cur = w.dataset.currency;
    const fmt = new Intl.NumberFormat(document.documentElement.lang || undefined, cur ? { style: 'currency', currency: cur } : { maximumFractionDigits: 2 });
    const val = n => parseFloat(w.querySelector('[name=' + n + ']').value) || 0;
    const out = w.querySelector('output'), interest = w.querySelector('[data-interest]');
    const run = () => {
      const amount = val('amount'), rate = val('rate') / 1200, months = Math.round(val('years') * 12);
      if (amount <= 0 || months <= 0) { out.textContent = interest.textContent = '–'; return; }
      const pay = rate ? amount * rate / (1 - Math.pow(1 + rate, -months)) : amount / months;
      out.textContent = fmt.format(pay);
      interest.textContent = fmt.format(pay * months - amount);
    };
    w.addEventListener('input', run);
    run();
  }
})();
</script>

Bill splitter

Tip included, each person’s share rounded up to the cent.

4.4 KB, no dependenciesFull tool
Show the code
<!-- fixmint widget: Split bill. Free to use and change: https://fixmint.cc/widgets -->
<div class="fmw fmw-split" data-theme="light" style="--fmw-accent:#0D795A;--fmw-on:#fff" data-currency="">
  <p class="fmw-t">Split the bill</p>
  <div class="fmw-g">
    <label>Bill<input type="number" inputmode="decimal" min="0" step="0.01" value="84.50" name="bill"></label>
    <label>Tip %<input type="number" inputmode="decimal" min="0" value="15" name="tip"></label>
    <label>People<input type="number" inputmode="numeric" min="1" value="3" name="people"></label>
  </div>
  <div class="fmw-out" aria-live="polite">
    <span class="fmw-sub">Each person pays</span>
    <output class="fmw-big">–</output>
    <span class="fmw-sub">Total with tip <b data-total>–</b></span>
  </div>
  <a class="fmw-by" href="https://fixmint.cc/split-bill">Bill splitter by fixmint</a>
</div>
<style>
.fmw{--fmw-accent:#0D795A;--fmw-on:#fff;--fmw-bg:#fff;--fmw-fg:#22191D;--fmw-mute:#6A5E63;--fmw-line:#dbe3df;--fmw-field:#f3f6f4;--fmw-hi:var(--fmw-fg);--fmw-hi:color-mix(in srgb,var(--fmw-accent) 42%,#111);box-sizing:border-box;width:100%;max-width:440px;min-width:0;padding:clamp(12px,5%,20px);border:1px solid var(--fmw-line);border-radius:16px;background:var(--fmw-bg);color:var(--fmw-fg);font:inherit;line-height:1.45;text-align:left;overflow-wrap:anywhere}
.fmw[data-theme=dark]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}
@media (prefers-color-scheme:dark){.fmw[data-theme=auto]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}}
@supports not (color:color-mix(in srgb,#000,#fff)){.fmw{--fmw-hi:var(--fmw-fg)}}
.fmw *{box-sizing:border-box;min-width:0}
.fmw-t{margin:0 0 14px;font-size:1.05em;font-weight:700}
.fmw label{display:grid;gap:5px;font-size:.85em;color:var(--fmw-mute)}
.fmw input,.fmw select,.fmw textarea,.fmw button{font:inherit}
.fmw input,.fmw select,.fmw textarea{width:100%;min-height:44px;padding:9px 11px;border:1px solid var(--fmw-line);border-radius:10px;background:var(--fmw-field);color:var(--fmw-fg);font-size:1rem}
.fmw input[type=checkbox]{width:18px;height:18px;min-height:0;padding:0;accent-color:var(--fmw-accent)}
.fmw input[type=range]{min-height:28px;padding:0;border:0;background:none;accent-color:var(--fmw-accent)}
.fmw :focus-visible{outline:2px solid var(--fmw-fg);outline-offset:2px}
.fmw-g{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,110px),1fr));gap:10px}
.fmw-out{display:grid;gap:2px;margin-top:16px;padding:14px 16px;border-radius:12px;background:var(--fmw-field);background:color-mix(in srgb,var(--fmw-accent) 9%,var(--fmw-bg))}
.fmw-big{font-size:2em;font-weight:800;line-height:1.15;letter-spacing:-.02em;color:var(--fmw-hi);font-variant-numeric:tabular-nums}
.fmw-sub{font-size:.85em;color:var(--fmw-mute)}
.fmw-sub b{color:var(--fmw-fg);font-variant-numeric:tabular-nums}
.fmw-btn{min-height:44px;padding:0 16px;border:1px solid transparent;border-radius:10px;background:var(--fmw-accent);color:var(--fmw-on);font-weight:700;cursor:pointer}
.fmw-btn:hover{text-decoration:underline;text-underline-offset:.18em}
.fmw-ghost{border-color:var(--fmw-line);background:transparent;color:var(--fmw-fg)}
.fmw-by{display:inline-block;margin-top:14px;font-size:.75em;color:var(--fmw-mute);text-decoration:none}
.fmw-by:hover{text-decoration:underline}
</style>
<script>
(() => {
  for (const w of document.querySelectorAll('.fmw-split:not([data-ready])')) {
    w.dataset.ready = '';
    const cur = w.dataset.currency;
    const fmt = new Intl.NumberFormat(document.documentElement.lang || undefined, cur ? { style: 'currency', currency: cur } : { minimumFractionDigits: 2, maximumFractionDigits: 2 });
    const val = n => parseFloat(w.querySelector('[name=' + n + ']').value) || 0;
    const out = w.querySelector('output'), total = w.querySelector('[data-total]');
    const run = () => {
      const all = val('bill') * (1 + val('tip') / 100), people = Math.max(1, Math.round(val('people')));
      // Round each share up to the cent, so the shares never add up to less than the bill.
      out.textContent = fmt.format(Math.ceil(all / people * 100) / 100);
      total.textContent = fmt.format(all);
    };
    w.addEventListener('input', run);
    run();
  }
})();
</script>

Percentage calculator

The three percentage questions people actually ask, answered as they type.

4.9 KB, no dependenciesFull tool
Show the code
<!-- fixmint widget: Percentage calculator. Free to use and change: https://fixmint.cc/widgets -->
<div class="fmw fmw-pct" data-theme="light" style="--fmw-accent:#0D795A;--fmw-on:#fff">
  <p class="fmw-t">Percentage calculator</p>
  <div class="fmw-line"><input type="number" inputmode="decimal" value="15" aria-label="Percent" data-a><span>% of</span><input type="number" inputmode="decimal" value="80" aria-label="Number" data-b><span>is</span><output data-r="of">–</output></div>
  <div class="fmw-line"><input type="number" inputmode="decimal" value="12" aria-label="Part" data-c><span>is what % of</span><input type="number" inputmode="decimal" value="48" aria-label="Whole" data-d><output data-r="share">–</output></div>
  <div class="fmw-line"><span>From</span><input type="number" inputmode="decimal" value="50" aria-label="Old value" data-e><span>to</span><input type="number" inputmode="decimal" value="65" aria-label="New value" data-f><output data-r="change">–</output></div>
  <a class="fmw-by" href="https://fixmint.cc/percentage-calculator">Percentage calculator by fixmint</a>
</div>
<style>
.fmw{--fmw-accent:#0D795A;--fmw-on:#fff;--fmw-bg:#fff;--fmw-fg:#22191D;--fmw-mute:#6A5E63;--fmw-line:#dbe3df;--fmw-field:#f3f6f4;--fmw-hi:var(--fmw-fg);--fmw-hi:color-mix(in srgb,var(--fmw-accent) 42%,#111);box-sizing:border-box;width:100%;max-width:440px;min-width:0;padding:clamp(12px,5%,20px);border:1px solid var(--fmw-line);border-radius:16px;background:var(--fmw-bg);color:var(--fmw-fg);font:inherit;line-height:1.45;text-align:left;overflow-wrap:anywhere}
.fmw[data-theme=dark]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}
@media (prefers-color-scheme:dark){.fmw[data-theme=auto]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}}
@supports not (color:color-mix(in srgb,#000,#fff)){.fmw{--fmw-hi:var(--fmw-fg)}}
.fmw *{box-sizing:border-box;min-width:0}
.fmw-t{margin:0 0 14px;font-size:1.05em;font-weight:700}
.fmw label{display:grid;gap:5px;font-size:.85em;color:var(--fmw-mute)}
.fmw input,.fmw select,.fmw textarea,.fmw button{font:inherit}
.fmw input,.fmw select,.fmw textarea{width:100%;min-height:44px;padding:9px 11px;border:1px solid var(--fmw-line);border-radius:10px;background:var(--fmw-field);color:var(--fmw-fg);font-size:1rem}
.fmw input[type=checkbox]{width:18px;height:18px;min-height:0;padding:0;accent-color:var(--fmw-accent)}
.fmw input[type=range]{min-height:28px;padding:0;border:0;background:none;accent-color:var(--fmw-accent)}
.fmw :focus-visible{outline:2px solid var(--fmw-fg);outline-offset:2px}
.fmw-g{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,110px),1fr));gap:10px}
.fmw-out{display:grid;gap:2px;margin-top:16px;padding:14px 16px;border-radius:12px;background:var(--fmw-field);background:color-mix(in srgb,var(--fmw-accent) 9%,var(--fmw-bg))}
.fmw-big{font-size:2em;font-weight:800;line-height:1.15;letter-spacing:-.02em;color:var(--fmw-hi);font-variant-numeric:tabular-nums}
.fmw-sub{font-size:.85em;color:var(--fmw-mute)}
.fmw-sub b{color:var(--fmw-fg);font-variant-numeric:tabular-nums}
.fmw-btn{min-height:44px;padding:0 16px;border:1px solid transparent;border-radius:10px;background:var(--fmw-accent);color:var(--fmw-on);font-weight:700;cursor:pointer}
.fmw-btn:hover{text-decoration:underline;text-underline-offset:.18em}
.fmw-ghost{border-color:var(--fmw-line);background:transparent;color:var(--fmw-fg)}
.fmw-by{display:inline-block;margin-top:14px;font-size:.75em;color:var(--fmw-mute);text-decoration:none}
.fmw-by:hover{text-decoration:underline}
.fmw-line{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:12px 0;border-top:1px solid var(--fmw-line)}
.fmw-line:first-of-type{border-top:0;padding-top:0}
.fmw-line input{width:5.5em;max-width:100%;flex:none}
.fmw-line span{color:var(--fmw-mute);font-size:.92em}
.fmw-line output{margin-left:auto;font-size:1.35em;font-weight:800;color:var(--fmw-hi);font-variant-numeric:tabular-nums}
</style>
<script>
(() => {
  for (const w of document.querySelectorAll('.fmw-pct:not([data-ready])')) {
    w.dataset.ready = '';
    const fmt = new Intl.NumberFormat(document.documentElement.lang || undefined, { maximumFractionDigits: 2 });
    const v = k => parseFloat(w.querySelector('[data-' + k + ']').value);
    const put = (k, n, unit = '', sign = false) => {
      w.querySelector('[data-r=' + k + ']').textContent = isFinite(n) ? (sign && n > 0 ? '+' : '') + fmt.format(n) + unit : '–';
    };
    const run = () => {
      put('of', v('a') * v('b') / 100);
      put('share', v('c') / v('d') * 100, '%');
      put('change', (v('f') - v('e')) / Math.abs(v('e')) * 100, '%', true);
    };
    w.addEventListener('input', run);
    run();
  }
})();
</script>

Everyday numbers

Unit converter

Length, weight and temperature, metric and imperial.

5.9 KB, no dependenciesFull tool
Show the code
<!-- fixmint widget: Unit converter. Free to use and change: https://fixmint.cc/widgets -->
<div class="fmw fmw-units" data-theme="light" style="--fmw-accent:#0D795A;--fmw-on:#fff">
  <p class="fmw-t">Unit converter</p>
  <label>Measure<select data-kind>
    <option value="length">Length</option>
    <option value="weight">Weight</option>
    <option value="temp">Temperature</option>
  </select></label>
  <div class="fmw-conv">
    <input type="number" inputmode="decimal" value="1" aria-label="Value" data-v>
    <select aria-label="From" data-from></select>
    <button class="fmw-swap" type="button" aria-label="Swap units" data-swap><svg viewBox="0 0 24 24" width="20" height="20" aria-hidden="true"><path d="M7 4 3 8l4 4M3 8h14M17 20l4-4-4-4m4 4H7" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></button>
    <select aria-label="To" data-to></select>
  </div>
  <div class="fmw-out" aria-live="polite"><output class="fmw-big">–</output></div>
  <a class="fmw-by" href="https://fixmint.cc/unit-converter">Unit converter by fixmint</a>
</div>
<style>
.fmw{--fmw-accent:#0D795A;--fmw-on:#fff;--fmw-bg:#fff;--fmw-fg:#22191D;--fmw-mute:#6A5E63;--fmw-line:#dbe3df;--fmw-field:#f3f6f4;--fmw-hi:var(--fmw-fg);--fmw-hi:color-mix(in srgb,var(--fmw-accent) 42%,#111);box-sizing:border-box;width:100%;max-width:440px;min-width:0;padding:clamp(12px,5%,20px);border:1px solid var(--fmw-line);border-radius:16px;background:var(--fmw-bg);color:var(--fmw-fg);font:inherit;line-height:1.45;text-align:left;overflow-wrap:anywhere}
.fmw[data-theme=dark]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}
@media (prefers-color-scheme:dark){.fmw[data-theme=auto]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}}
@supports not (color:color-mix(in srgb,#000,#fff)){.fmw{--fmw-hi:var(--fmw-fg)}}
.fmw *{box-sizing:border-box;min-width:0}
.fmw-t{margin:0 0 14px;font-size:1.05em;font-weight:700}
.fmw label{display:grid;gap:5px;font-size:.85em;color:var(--fmw-mute)}
.fmw input,.fmw select,.fmw textarea,.fmw button{font:inherit}
.fmw input,.fmw select,.fmw textarea{width:100%;min-height:44px;padding:9px 11px;border:1px solid var(--fmw-line);border-radius:10px;background:var(--fmw-field);color:var(--fmw-fg);font-size:1rem}
.fmw input[type=checkbox]{width:18px;height:18px;min-height:0;padding:0;accent-color:var(--fmw-accent)}
.fmw input[type=range]{min-height:28px;padding:0;border:0;background:none;accent-color:var(--fmw-accent)}
.fmw :focus-visible{outline:2px solid var(--fmw-fg);outline-offset:2px}
.fmw-g{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,110px),1fr));gap:10px}
.fmw-out{display:grid;gap:2px;margin-top:16px;padding:14px 16px;border-radius:12px;background:var(--fmw-field);background:color-mix(in srgb,var(--fmw-accent) 9%,var(--fmw-bg))}
.fmw-big{font-size:2em;font-weight:800;line-height:1.15;letter-spacing:-.02em;color:var(--fmw-hi);font-variant-numeric:tabular-nums}
.fmw-sub{font-size:.85em;color:var(--fmw-mute)}
.fmw-sub b{color:var(--fmw-fg);font-variant-numeric:tabular-nums}
.fmw-btn{min-height:44px;padding:0 16px;border:1px solid transparent;border-radius:10px;background:var(--fmw-accent);color:var(--fmw-on);font-weight:700;cursor:pointer}
.fmw-btn:hover{text-decoration:underline;text-underline-offset:.18em}
.fmw-ghost{border-color:var(--fmw-line);background:transparent;color:var(--fmw-fg)}
.fmw-by{display:inline-block;margin-top:14px;font-size:.75em;color:var(--fmw-mute);text-decoration:none}
.fmw-by:hover{text-decoration:underline}
.fmw-conv{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:8px;margin-top:12px}
.fmw-conv input{grid-column:1/-1}
.fmw-swap{min-width:44px;min-height:44px;border:1px solid var(--fmw-line);border-radius:10px;background:transparent;color:var(--fmw-fg);cursor:pointer;display:grid;place-items:center}
.fmw-swap:hover{border-color:var(--fmw-accent);color:var(--fmw-hi)}
</style>
<script>
(() => {
  // Factors to the base unit (metre, kilogram); temperature goes through Celsius.
  const U = {
    length: { mm: .001, cm: .01, m: 1, km: 1000, in: .0254, ft: .3048, yd: .9144, mi: 1609.344 },
    weight: { g: .001, kg: 1, t: 1000, oz: .028349523125, lb: .45359237, st: 6.35029318 },
    temp: { '°C': 0, '°F': 0, K: 0 }
  };
  const PAIR = { length: ['m', 'ft'], weight: ['kg', 'lb'], temp: ['°C', '°F'] };
  const toC = { '°C': x => x, '°F': x => (x - 32) * 5 / 9, K: x => x - 273.15 };
  const fromC = { '°C': x => x, '°F': x => x * 9 / 5 + 32, K: x => x + 273.15 };
  for (const w of document.querySelectorAll('.fmw-units:not([data-ready])')) {
    w.dataset.ready = '';
    const $ = s => w.querySelector(s), from = $('[data-from]'), to = $('[data-to]'), kind = $('[data-kind]'), out = $('output');
    const fmt = new Intl.NumberFormat(document.documentElement.lang || undefined, { maximumSignificantDigits: 6 });
    const fill = () => {
      const k = kind.value, opts = Object.keys(U[k]).map(u => '<option>' + u + '</option>').join('');
      from.innerHTML = to.innerHTML = opts;
      [from.value, to.value] = PAIR[k];
    };
    const run = () => {
      const x = parseFloat($('[data-v]').value), k = kind.value;
      if (!isFinite(x)) { out.textContent = '–'; return; }
      const y = k === 'temp' ? fromC[to.value](toC[from.value](x)) : x * U[k][from.value] / U[k][to.value];
      out.textContent = fmt.format(y) + ' ' + to.value;
    };
    kind.addEventListener('change', fill);
    $('[data-swap]').addEventListener('click', () => { [from.value, to.value] = [to.value, from.value]; run(); });
    w.addEventListener('input', run);
    w.addEventListener('change', run);
    fill();
    run();
  }
})();
</script>

Age calculator

Exact age in years, months and days, and the days until the next birthday.

4.6 KB, no dependenciesFull tool
Show the code
<!-- fixmint widget: Age calculator. Free to use and change: https://fixmint.cc/widgets -->
<div class="fmw fmw-age" data-theme="light" style="--fmw-accent:#0D795A;--fmw-on:#fff">
  <p class="fmw-t">How old am I?</p>
  <label>Date of birth<input type="date" value="1990-06-15" data-born></label>
  <div class="fmw-out" aria-live="polite">
    <span class="fmw-sub">Age in years</span>
    <output class="fmw-big">–</output>
    <span class="fmw-sub">and <b data-m>–</b> months, <b data-d>–</b> days. Next birthday in <b data-next>–</b> days.</span>
  </div>
  <a class="fmw-by" href="https://fixmint.cc/age-calculator">Age calculator by fixmint</a>
</div>
<style>
.fmw{--fmw-accent:#0D795A;--fmw-on:#fff;--fmw-bg:#fff;--fmw-fg:#22191D;--fmw-mute:#6A5E63;--fmw-line:#dbe3df;--fmw-field:#f3f6f4;--fmw-hi:var(--fmw-fg);--fmw-hi:color-mix(in srgb,var(--fmw-accent) 42%,#111);box-sizing:border-box;width:100%;max-width:440px;min-width:0;padding:clamp(12px,5%,20px);border:1px solid var(--fmw-line);border-radius:16px;background:var(--fmw-bg);color:var(--fmw-fg);font:inherit;line-height:1.45;text-align:left;overflow-wrap:anywhere}
.fmw[data-theme=dark]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}
@media (prefers-color-scheme:dark){.fmw[data-theme=auto]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}}
@supports not (color:color-mix(in srgb,#000,#fff)){.fmw{--fmw-hi:var(--fmw-fg)}}
.fmw *{box-sizing:border-box;min-width:0}
.fmw-t{margin:0 0 14px;font-size:1.05em;font-weight:700}
.fmw label{display:grid;gap:5px;font-size:.85em;color:var(--fmw-mute)}
.fmw input,.fmw select,.fmw textarea,.fmw button{font:inherit}
.fmw input,.fmw select,.fmw textarea{width:100%;min-height:44px;padding:9px 11px;border:1px solid var(--fmw-line);border-radius:10px;background:var(--fmw-field);color:var(--fmw-fg);font-size:1rem}
.fmw input[type=checkbox]{width:18px;height:18px;min-height:0;padding:0;accent-color:var(--fmw-accent)}
.fmw input[type=range]{min-height:28px;padding:0;border:0;background:none;accent-color:var(--fmw-accent)}
.fmw :focus-visible{outline:2px solid var(--fmw-fg);outline-offset:2px}
.fmw-g{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,110px),1fr));gap:10px}
.fmw-out{display:grid;gap:2px;margin-top:16px;padding:14px 16px;border-radius:12px;background:var(--fmw-field);background:color-mix(in srgb,var(--fmw-accent) 9%,var(--fmw-bg))}
.fmw-big{font-size:2em;font-weight:800;line-height:1.15;letter-spacing:-.02em;color:var(--fmw-hi);font-variant-numeric:tabular-nums}
.fmw-sub{font-size:.85em;color:var(--fmw-mute)}
.fmw-sub b{color:var(--fmw-fg);font-variant-numeric:tabular-nums}
.fmw-btn{min-height:44px;padding:0 16px;border:1px solid transparent;border-radius:10px;background:var(--fmw-accent);color:var(--fmw-on);font-weight:700;cursor:pointer}
.fmw-btn:hover{text-decoration:underline;text-underline-offset:.18em}
.fmw-ghost{border-color:var(--fmw-line);background:transparent;color:var(--fmw-fg)}
.fmw-by{display:inline-block;margin-top:14px;font-size:.75em;color:var(--fmw-mute);text-decoration:none}
.fmw-by:hover{text-decoration:underline}
</style>
<script>
(() => {
  for (const w of document.querySelectorAll('.fmw-age:not([data-ready])')) {
    w.dataset.ready = '';
    const $ = s => w.querySelector(s), input = $('[data-born]');
    const days = (a, b) => Math.round((Date.UTC(b.getFullYear(), b.getMonth(), b.getDate()) - Date.UTC(a.getFullYear(), a.getMonth(), a.getDate())) / 864e5);
    const run = () => {
      const [y, m, d] = input.value.split('-').map(Number), now = new Date();
      const born = new Date(y, m - 1, d);
      if (!y || born > now) { $('output').textContent = $('[data-m]').textContent = $('[data-d]').textContent = $('[data-next]').textContent = '–'; return; }
      let years = now.getFullYear() - y, months = now.getMonth() - (m - 1), dd = now.getDate() - d;
      if (dd < 0) { months--; dd += new Date(now.getFullYear(), now.getMonth(), 0).getDate(); }
      if (months < 0) { years--; months += 12; }
      let next = new Date(now.getFullYear(), m - 1, d);
      if (days(now, next) < 0) next = new Date(now.getFullYear() + 1, m - 1, d);
      $('output').textContent = years;
      $('[data-m]').textContent = months;
      $('[data-d]').textContent = dd;
      $('[data-next]').textContent = days(now, next);
    };
    input.max = new Date().toISOString().slice(0, 10);
    input.addEventListener('input', run);
    run();
  }
})();
</script>

BMI calculator

Body mass index on the adult scale, in centimetres and kilos or inches and pounds.

5.8 KB, no dependenciesFull tool
Show the code
<!-- fixmint widget: Bmi calculator. Free to use and change: https://fixmint.cc/widgets -->
<div class="fmw fmw-bmi" data-theme="light" style="--fmw-accent:#0D795A;--fmw-on:#fff">
  <p class="fmw-t">BMI calculator</p>
  <div class="fmw-g">
    <label>Height<input type="number" inputmode="decimal" min="0" value="175" name="h"></label>
    <label>Weight<input type="number" inputmode="decimal" min="0" value="70" name="w"></label>
    <label>Units<select name="u"><option value="metric">cm, kg</option><option value="us">in, lb</option></select></label>
  </div>
  <div class="fmw-out" aria-live="polite">
    <span class="fmw-sub">BMI</span>
    <output class="fmw-big">–</output>
    <div class="fmw-scale"><i data-mark></i><span style="left:17.5%">18.5</span><span style="left:50%">25</span><span style="left:75%">30</span></div>
    <div class="fmw-legend"><span data-to="18.5">Underweight</span><span data-to="25">Healthy</span><span data-to="30">Overweight</span><span data-to="999">Obesity</span></div>
  </div>
  <a class="fmw-by" href="https://fixmint.cc/bmi-calculator">BMI calculator by fixmint</a>
</div>
<style>
.fmw{--fmw-accent:#0D795A;--fmw-on:#fff;--fmw-bg:#fff;--fmw-fg:#22191D;--fmw-mute:#6A5E63;--fmw-line:#dbe3df;--fmw-field:#f3f6f4;--fmw-hi:var(--fmw-fg);--fmw-hi:color-mix(in srgb,var(--fmw-accent) 42%,#111);box-sizing:border-box;width:100%;max-width:440px;min-width:0;padding:clamp(12px,5%,20px);border:1px solid var(--fmw-line);border-radius:16px;background:var(--fmw-bg);color:var(--fmw-fg);font:inherit;line-height:1.45;text-align:left;overflow-wrap:anywhere}
.fmw[data-theme=dark]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}
@media (prefers-color-scheme:dark){.fmw[data-theme=auto]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}}
@supports not (color:color-mix(in srgb,#000,#fff)){.fmw{--fmw-hi:var(--fmw-fg)}}
.fmw *{box-sizing:border-box;min-width:0}
.fmw-t{margin:0 0 14px;font-size:1.05em;font-weight:700}
.fmw label{display:grid;gap:5px;font-size:.85em;color:var(--fmw-mute)}
.fmw input,.fmw select,.fmw textarea,.fmw button{font:inherit}
.fmw input,.fmw select,.fmw textarea{width:100%;min-height:44px;padding:9px 11px;border:1px solid var(--fmw-line);border-radius:10px;background:var(--fmw-field);color:var(--fmw-fg);font-size:1rem}
.fmw input[type=checkbox]{width:18px;height:18px;min-height:0;padding:0;accent-color:var(--fmw-accent)}
.fmw input[type=range]{min-height:28px;padding:0;border:0;background:none;accent-color:var(--fmw-accent)}
.fmw :focus-visible{outline:2px solid var(--fmw-fg);outline-offset:2px}
.fmw-g{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,110px),1fr));gap:10px}
.fmw-out{display:grid;gap:2px;margin-top:16px;padding:14px 16px;border-radius:12px;background:var(--fmw-field);background:color-mix(in srgb,var(--fmw-accent) 9%,var(--fmw-bg))}
.fmw-big{font-size:2em;font-weight:800;line-height:1.15;letter-spacing:-.02em;color:var(--fmw-hi);font-variant-numeric:tabular-nums}
.fmw-sub{font-size:.85em;color:var(--fmw-mute)}
.fmw-sub b{color:var(--fmw-fg);font-variant-numeric:tabular-nums}
.fmw-btn{min-height:44px;padding:0 16px;border:1px solid transparent;border-radius:10px;background:var(--fmw-accent);color:var(--fmw-on);font-weight:700;cursor:pointer}
.fmw-btn:hover{text-decoration:underline;text-underline-offset:.18em}
.fmw-ghost{border-color:var(--fmw-line);background:transparent;color:var(--fmw-fg)}
.fmw-by{display:inline-block;margin-top:14px;font-size:.75em;color:var(--fmw-mute);text-decoration:none}
.fmw-by:hover{text-decoration:underline}
.fmw-scale{position:relative;height:8px;margin:12px 0 6px;border-radius:99px;background:linear-gradient(90deg,color-mix(in srgb,var(--fmw-accent) 35%,var(--fmw-bg)) 0 17.5%,var(--fmw-accent) 17.5% 50%,color-mix(in srgb,var(--fmw-accent) 50%,var(--fmw-bg)) 50% 75%,color-mix(in srgb,var(--fmw-accent) 25%,var(--fmw-bg)) 75%)}
.fmw-scale i{position:absolute;top:50%;width:16px;height:16px;margin:-8px 0 0 -8px;border:3px solid var(--fmw-bg);border-radius:50%;background:var(--fmw-fg);transition:left .3s}
.fmw-scale span{position:absolute;top:12px;transform:translateX(-50%);font-size:.7em;color:var(--fmw-mute);font-variant-numeric:tabular-nums}
.fmw-legend{margin-top:22px;font-weight:700}
.fmw-legend span{display:none}
.fmw-legend .is-on{display:inline}
</style>
<script>
(() => {
  for (const w of document.querySelectorAll('.fmw-bmi:not([data-ready])')) {
    w.dataset.ready = '';
    const $ = s => w.querySelector(s), h = $('[name=h]'), kg = $('[name=w]'), u = $('[name=u]');
    const fmt = new Intl.NumberFormat(document.documentElement.lang || undefined, { minimumFractionDigits: 1, maximumFractionDigits: 1 });
    const run = () => {
      const us = u.value === 'us', m = (parseFloat(h.value) || 0) * (us ? .0254 : .01), mass = (parseFloat(kg.value) || 0) * (us ? .45359237 : 1);
      const bmi = m > 0 ? mass / (m * m) : 0;
      $('output').textContent = bmi ? fmt.format(bmi) : '–';
      // The scale runs from 15 to 35 (the four bands sit at 18.5, 25 and 30).
      $('[data-mark]').style.left = Math.min(100, Math.max(0, (bmi - 15) / 20 * 100)) + '%';
      let hit = false;
      for (const s of w.querySelectorAll('[data-to]')) { const on = !hit && bmi > 0 && bmi < +s.dataset.to; s.classList.toggle('is-on', on); hit ||= on; }
    };
    u.addEventListener('change', () => {
      const us = u.value === 'us';
      h.value = Math.round((parseFloat(h.value) || 0) * (us ? 1 / 2.54 : 2.54));
      kg.value = Math.round((parseFloat(kg.value) || 0) * (us ? 2.20462 : 1 / 2.20462));
      run();
    });
    w.addEventListener('input', run);
    run();
  }
})();
</script>

Time

Timer

A countdown with presets and a soft beep at the end.

6.3 KB, no dependenciesFull tool
Show the code
<!-- fixmint widget: Online timer. Free to use and change: https://fixmint.cc/widgets -->
<div class="fmw fmw-timer" data-theme="light" style="--fmw-accent:#0D795A;--fmw-on:#fff">
  <p class="fmw-t">Timer</p>
  <output class="fmw-clock" aria-live="off">05:00</output>
  <div class="fmw-bar"><i></i></div>
  <div class="fmw-pre">
    <button type="button" data-min="1">1 min</button>
    <button type="button" data-min="5" aria-pressed="true">5 min</button>
    <button type="button" data-min="10">10 min</button>
    <button type="button" data-min="25">25 min</button>
  </div>
  <div class="fmw-row">
    <button class="fmw-btn" type="button" data-go data-start="Start" data-pause="Pause" data-resume="Resume">Start</button>
    <button class="fmw-btn fmw-ghost" type="button" data-reset>Reset</button>
  </div>
  <a class="fmw-by" href="https://fixmint.cc/online-timer">Online timer by fixmint</a>
</div>
<style>
.fmw{--fmw-accent:#0D795A;--fmw-on:#fff;--fmw-bg:#fff;--fmw-fg:#22191D;--fmw-mute:#6A5E63;--fmw-line:#dbe3df;--fmw-field:#f3f6f4;--fmw-hi:var(--fmw-fg);--fmw-hi:color-mix(in srgb,var(--fmw-accent) 42%,#111);box-sizing:border-box;width:100%;max-width:440px;min-width:0;padding:clamp(12px,5%,20px);border:1px solid var(--fmw-line);border-radius:16px;background:var(--fmw-bg);color:var(--fmw-fg);font:inherit;line-height:1.45;text-align:left;overflow-wrap:anywhere}
.fmw[data-theme=dark]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}
@media (prefers-color-scheme:dark){.fmw[data-theme=auto]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}}
@supports not (color:color-mix(in srgb,#000,#fff)){.fmw{--fmw-hi:var(--fmw-fg)}}
.fmw *{box-sizing:border-box;min-width:0}
.fmw-t{margin:0 0 14px;font-size:1.05em;font-weight:700}
.fmw label{display:grid;gap:5px;font-size:.85em;color:var(--fmw-mute)}
.fmw input,.fmw select,.fmw textarea,.fmw button{font:inherit}
.fmw input,.fmw select,.fmw textarea{width:100%;min-height:44px;padding:9px 11px;border:1px solid var(--fmw-line);border-radius:10px;background:var(--fmw-field);color:var(--fmw-fg);font-size:1rem}
.fmw input[type=checkbox]{width:18px;height:18px;min-height:0;padding:0;accent-color:var(--fmw-accent)}
.fmw input[type=range]{min-height:28px;padding:0;border:0;background:none;accent-color:var(--fmw-accent)}
.fmw :focus-visible{outline:2px solid var(--fmw-fg);outline-offset:2px}
.fmw-g{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,110px),1fr));gap:10px}
.fmw-out{display:grid;gap:2px;margin-top:16px;padding:14px 16px;border-radius:12px;background:var(--fmw-field);background:color-mix(in srgb,var(--fmw-accent) 9%,var(--fmw-bg))}
.fmw-big{font-size:2em;font-weight:800;line-height:1.15;letter-spacing:-.02em;color:var(--fmw-hi);font-variant-numeric:tabular-nums}
.fmw-sub{font-size:.85em;color:var(--fmw-mute)}
.fmw-sub b{color:var(--fmw-fg);font-variant-numeric:tabular-nums}
.fmw-btn{min-height:44px;padding:0 16px;border:1px solid transparent;border-radius:10px;background:var(--fmw-accent);color:var(--fmw-on);font-weight:700;cursor:pointer}
.fmw-btn:hover{text-decoration:underline;text-underline-offset:.18em}
.fmw-ghost{border-color:var(--fmw-line);background:transparent;color:var(--fmw-fg)}
.fmw-by{display:inline-block;margin-top:14px;font-size:.75em;color:var(--fmw-mute);text-decoration:none}
.fmw-by:hover{text-decoration:underline}
.fmw-clock{display:block;font-size:3.4em;font-weight:800;line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums;color:var(--fmw-fg)}
.fmw-timer.is-done .fmw-clock{color:var(--fmw-hi)}
.fmw-bar{height:6px;margin:14px 0;border-radius:99px;background:var(--fmw-field);overflow:hidden}
.fmw-bar i{display:block;height:100%;width:0;background:var(--fmw-accent);border-radius:inherit}
.fmw-pre{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.fmw-pre button{min-height:44px;padding:0 11px;font-size:.92em;border:1px solid var(--fmw-line);border-radius:99px;background:transparent;color:var(--fmw-fg);cursor:pointer}
.fmw-pre [aria-pressed=true]{border-color:var(--fmw-accent);color:var(--fmw-hi);font-weight:700}
.fmw-row{display:flex;gap:8px;flex-wrap:wrap}
</style>
<script>
(() => {
  const beep = () => {
    try {
      const a = new AudioContext();
      [0, .4, .8].forEach(t => {
        const o = a.createOscillator(), g = a.createGain();
        o.frequency.value = 880;
        g.gain.setValueAtTime(.25, a.currentTime + t);
        g.gain.exponentialRampToValueAtTime(.001, a.currentTime + t + .35);
        o.connect(g).connect(a.destination);
        o.start(a.currentTime + t);
        o.stop(a.currentTime + t + .35);
      });
    } catch {}
  };
  for (const w of document.querySelectorAll('.fmw-timer:not([data-ready])')) {
    w.dataset.ready = '';
    const $ = s => w.querySelector(s), go = $('[data-go]'), clock = $('output'), bar = $('.fmw-bar i');
    let total = 300e3, left = total, end = 0, tick = 0;
    const show = () => {
      const s = Math.ceil(left / 1000);
      clock.textContent = String(Math.floor(s / 60)).padStart(2, '0') + ':' + String(s % 60).padStart(2, '0');
      bar.style.width = (1 - left / total) * 100 + '%';
    };
    const stop = label => { clearInterval(tick); tick = 0; go.textContent = go.dataset[label]; };
    const set = ms => { stop('start'); total = left = ms; w.classList.remove('is-done'); show(); };
    go.addEventListener('click', () => {
      if (tick) { left = end - Date.now(); stop('resume'); return; }
      if (left <= 0) set(total);
      end = Date.now() + left;
      go.textContent = go.dataset.pause;
      tick = setInterval(() => {
        left = Math.max(0, end - Date.now());
        show();
        if (!left) { stop('start'); w.classList.add('is-done'); beep(); }
      }, 200);
    });
    $('[data-reset]').addEventListener('click', () => set(total));
    for (const b of w.querySelectorAll('[data-min]')) b.addEventListener('click', () => {
      for (const o of w.querySelectorAll('[data-min]')) o.setAttribute('aria-pressed', o === b);
      set(b.dataset.min * 60e3);
    });
    show();
  }
})();
</script>

Countdown to a date

Days, hours, minutes and seconds to a launch, a sale or an event.

4.3 KB, no dependenciesFull tool
Show the code
<!-- fixmint widget: Date calculator. Free to use and change: https://fixmint.cc/widgets -->
<div class="fmw fmw-countdown" data-theme="light" style="--fmw-accent:#0D795A;--fmw-on:#fff" data-date="2027-01-01T00:00:00">
  <p class="fmw-t">Countdown to New Year 2027</p>
  <div class="fmw-cd" aria-live="off">
    <span><b data-u="d">–</b>days</span>
    <span><b data-u="h">–</b>hours</span>
    <span><b data-u="m">–</b>minutes</span>
    <span><b data-u="s">–</b>seconds</span>
  </div>
  <p class="fmw-sub" data-done hidden>It’s here.</p>
  <a class="fmw-by" href="https://fixmint.cc/date-calculator">Date calculator by fixmint</a>
</div>
<style>
.fmw{--fmw-accent:#0D795A;--fmw-on:#fff;--fmw-bg:#fff;--fmw-fg:#22191D;--fmw-mute:#6A5E63;--fmw-line:#dbe3df;--fmw-field:#f3f6f4;--fmw-hi:var(--fmw-fg);--fmw-hi:color-mix(in srgb,var(--fmw-accent) 42%,#111);box-sizing:border-box;width:100%;max-width:440px;min-width:0;padding:clamp(12px,5%,20px);border:1px solid var(--fmw-line);border-radius:16px;background:var(--fmw-bg);color:var(--fmw-fg);font:inherit;line-height:1.45;text-align:left;overflow-wrap:anywhere}
.fmw[data-theme=dark]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}
@media (prefers-color-scheme:dark){.fmw[data-theme=auto]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}}
@supports not (color:color-mix(in srgb,#000,#fff)){.fmw{--fmw-hi:var(--fmw-fg)}}
.fmw *{box-sizing:border-box;min-width:0}
.fmw-t{margin:0 0 14px;font-size:1.05em;font-weight:700}
.fmw label{display:grid;gap:5px;font-size:.85em;color:var(--fmw-mute)}
.fmw input,.fmw select,.fmw textarea,.fmw button{font:inherit}
.fmw input,.fmw select,.fmw textarea{width:100%;min-height:44px;padding:9px 11px;border:1px solid var(--fmw-line);border-radius:10px;background:var(--fmw-field);color:var(--fmw-fg);font-size:1rem}
.fmw input[type=checkbox]{width:18px;height:18px;min-height:0;padding:0;accent-color:var(--fmw-accent)}
.fmw input[type=range]{min-height:28px;padding:0;border:0;background:none;accent-color:var(--fmw-accent)}
.fmw :focus-visible{outline:2px solid var(--fmw-fg);outline-offset:2px}
.fmw-g{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,110px),1fr));gap:10px}
.fmw-out{display:grid;gap:2px;margin-top:16px;padding:14px 16px;border-radius:12px;background:var(--fmw-field);background:color-mix(in srgb,var(--fmw-accent) 9%,var(--fmw-bg))}
.fmw-big{font-size:2em;font-weight:800;line-height:1.15;letter-spacing:-.02em;color:var(--fmw-hi);font-variant-numeric:tabular-nums}
.fmw-sub{font-size:.85em;color:var(--fmw-mute)}
.fmw-sub b{color:var(--fmw-fg);font-variant-numeric:tabular-nums}
.fmw-btn{min-height:44px;padding:0 16px;border:1px solid transparent;border-radius:10px;background:var(--fmw-accent);color:var(--fmw-on);font-weight:700;cursor:pointer}
.fmw-btn:hover{text-decoration:underline;text-underline-offset:.18em}
.fmw-ghost{border-color:var(--fmw-line);background:transparent;color:var(--fmw-fg)}
.fmw-by{display:inline-block;margin-top:14px;font-size:.75em;color:var(--fmw-mute);text-decoration:none}
.fmw-by:hover{text-decoration:underline}
.fmw-cd{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.fmw-cd span{display:grid;justify-items:center;gap:2px;padding:12px 4px;border-radius:12px;background:var(--fmw-field);font-size:.78em;color:var(--fmw-mute)}
.fmw-cd b{font-size:2.2em;font-weight:800;line-height:1.1;color:var(--fmw-fg);font-variant-numeric:tabular-nums}
.fmw-cd span:first-child b{color:var(--fmw-hi)}
</style>
<script>
(() => {
  for (const w of document.querySelectorAll('.fmw-countdown:not([data-ready])')) {
    w.dataset.ready = '';
    const end = new Date(w.dataset.date).getTime(), u = k => w.querySelector('[data-u=' + k + ']');
    const run = () => {
      const s = Math.max(0, Math.floor((end - Date.now()) / 1000));
      u('d').textContent = Math.floor(s / 86400);
      u('h').textContent = Math.floor(s / 3600) % 24;
      u('m').textContent = Math.floor(s / 60) % 60;
      u('s').textContent = s % 60;
      w.querySelector('[data-done]').hidden = s > 0;
      if (!s) clearInterval(t);
    };
    const t = setInterval(run, 1000);
    run();
  }
})();
</script>

World clock

The time in the cities your readers or your team are in.

4.5 KB, no dependenciesFull tool
Show the code
<!-- fixmint widget: Time zone converter. Free to use and change: https://fixmint.cc/widgets -->
<div class="fmw fmw-world" data-theme="light" style="--fmw-accent:#0D795A;--fmw-on:#fff">
  <p class="fmw-t">World clock</p>
  <ul class="fmw-zones">
    <li data-zone="America/New_York">New York</li>
    <li data-zone="Europe/London">London</li>
    <li data-zone="Asia/Kolkata">Mumbai</li>
    <li data-zone="Asia/Tokyo">Tokyo</li>
  </ul>
  <a class="fmw-by" href="https://fixmint.cc/time-zone-converter">Time zone converter by fixmint</a>
</div>
<style>
.fmw{--fmw-accent:#0D795A;--fmw-on:#fff;--fmw-bg:#fff;--fmw-fg:#22191D;--fmw-mute:#6A5E63;--fmw-line:#dbe3df;--fmw-field:#f3f6f4;--fmw-hi:var(--fmw-fg);--fmw-hi:color-mix(in srgb,var(--fmw-accent) 42%,#111);box-sizing:border-box;width:100%;max-width:440px;min-width:0;padding:clamp(12px,5%,20px);border:1px solid var(--fmw-line);border-radius:16px;background:var(--fmw-bg);color:var(--fmw-fg);font:inherit;line-height:1.45;text-align:left;overflow-wrap:anywhere}
.fmw[data-theme=dark]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}
@media (prefers-color-scheme:dark){.fmw[data-theme=auto]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}}
@supports not (color:color-mix(in srgb,#000,#fff)){.fmw{--fmw-hi:var(--fmw-fg)}}
.fmw *{box-sizing:border-box;min-width:0}
.fmw-t{margin:0 0 14px;font-size:1.05em;font-weight:700}
.fmw label{display:grid;gap:5px;font-size:.85em;color:var(--fmw-mute)}
.fmw input,.fmw select,.fmw textarea,.fmw button{font:inherit}
.fmw input,.fmw select,.fmw textarea{width:100%;min-height:44px;padding:9px 11px;border:1px solid var(--fmw-line);border-radius:10px;background:var(--fmw-field);color:var(--fmw-fg);font-size:1rem}
.fmw input[type=checkbox]{width:18px;height:18px;min-height:0;padding:0;accent-color:var(--fmw-accent)}
.fmw input[type=range]{min-height:28px;padding:0;border:0;background:none;accent-color:var(--fmw-accent)}
.fmw :focus-visible{outline:2px solid var(--fmw-fg);outline-offset:2px}
.fmw-g{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,110px),1fr));gap:10px}
.fmw-out{display:grid;gap:2px;margin-top:16px;padding:14px 16px;border-radius:12px;background:var(--fmw-field);background:color-mix(in srgb,var(--fmw-accent) 9%,var(--fmw-bg))}
.fmw-big{font-size:2em;font-weight:800;line-height:1.15;letter-spacing:-.02em;color:var(--fmw-hi);font-variant-numeric:tabular-nums}
.fmw-sub{font-size:.85em;color:var(--fmw-mute)}
.fmw-sub b{color:var(--fmw-fg);font-variant-numeric:tabular-nums}
.fmw-btn{min-height:44px;padding:0 16px;border:1px solid transparent;border-radius:10px;background:var(--fmw-accent);color:var(--fmw-on);font-weight:700;cursor:pointer}
.fmw-btn:hover{text-decoration:underline;text-underline-offset:.18em}
.fmw-ghost{border-color:var(--fmw-line);background:transparent;color:var(--fmw-fg)}
.fmw-by{display:inline-block;margin-top:14px;font-size:.75em;color:var(--fmw-mute);text-decoration:none}
.fmw-by:hover{text-decoration:underline}
.fmw-zones{list-style:none;margin:0;padding:0}
.fmw-zones li{display:grid;grid-template-columns:1fr auto;align-items:baseline;gap:0 12px;padding:10px 0;border-top:1px solid var(--fmw-line);font-weight:650}
.fmw-zones li:first-child{border-top:0;padding-top:0}
.fmw-zones time{grid-row:span 2;font-size:1.6em;font-weight:800;font-variant-numeric:tabular-nums;color:var(--fmw-hi)}
.fmw-zones small{font-size:.78em;font-weight:400;color:var(--fmw-mute)}
</style>
<script>
(() => {
  const lang = document.documentElement.lang || undefined;
  for (const w of document.querySelectorAll('.fmw-world:not([data-ready])')) {
    w.dataset.ready = '';
    const rows = [...w.querySelectorAll('[data-zone]')].map(li => {
      const zone = li.dataset.zone, time = document.createElement('time'), info = document.createElement('small');
      li.append(time, info);
      return { time, info, hm: new Intl.DateTimeFormat(lang, { timeZone: zone, hour: '2-digit', minute: '2-digit' }), day: new Intl.DateTimeFormat(lang, { timeZone: zone, weekday: 'short', timeZoneName: 'shortOffset' }) };
    });
    const run = () => {
      const now = new Date();
      for (const r of rows) { r.time.textContent = r.hm.format(now); r.info.textContent = r.day.format(now); }
    };
    setInterval(run, 15e3);
    run();
  }
})();
</script>

Words and passwords

Word counter

Words, characters, sentences and reading time for any text box.

5.4 KB, no dependenciesFull tool
Show the code
<!-- fixmint widget: Word counter. Free to use and change: https://fixmint.cc/widgets -->
<div class="fmw fmw-words" data-theme="light" style="--fmw-accent:#0D795A;--fmw-on:#fff">
  <label>Your text<textarea rows="5" placeholder="Type or paste text">Small fixes for annoying problems. Paste your own text here and the numbers update as you type.</textarea></label>
  <dl class="fmw-stats" aria-live="polite">
    <div><dt>Words</dt><dd data-k="words">0</dd></div>
    <div><dt>Characters</dt><dd data-k="chars">0</dd></div>
    <div><dt>Sentences</dt><dd data-k="sentences">0</dd></div>
    <div><dt>Reading time</dt><dd data-k="read">0</dd></div>
  </dl>
  <a class="fmw-by" href="https://fixmint.cc/word-counter">Word counter by fixmint</a>
</div>
<style>
.fmw{--fmw-accent:#0D795A;--fmw-on:#fff;--fmw-bg:#fff;--fmw-fg:#22191D;--fmw-mute:#6A5E63;--fmw-line:#dbe3df;--fmw-field:#f3f6f4;--fmw-hi:var(--fmw-fg);--fmw-hi:color-mix(in srgb,var(--fmw-accent) 42%,#111);box-sizing:border-box;width:100%;max-width:440px;min-width:0;padding:clamp(12px,5%,20px);border:1px solid var(--fmw-line);border-radius:16px;background:var(--fmw-bg);color:var(--fmw-fg);font:inherit;line-height:1.45;text-align:left;overflow-wrap:anywhere}
.fmw[data-theme=dark]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}
@media (prefers-color-scheme:dark){.fmw[data-theme=auto]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}}
@supports not (color:color-mix(in srgb,#000,#fff)){.fmw{--fmw-hi:var(--fmw-fg)}}
.fmw *{box-sizing:border-box;min-width:0}
.fmw-t{margin:0 0 14px;font-size:1.05em;font-weight:700}
.fmw label{display:grid;gap:5px;font-size:.85em;color:var(--fmw-mute)}
.fmw input,.fmw select,.fmw textarea,.fmw button{font:inherit}
.fmw input,.fmw select,.fmw textarea{width:100%;min-height:44px;padding:9px 11px;border:1px solid var(--fmw-line);border-radius:10px;background:var(--fmw-field);color:var(--fmw-fg);font-size:1rem}
.fmw input[type=checkbox]{width:18px;height:18px;min-height:0;padding:0;accent-color:var(--fmw-accent)}
.fmw input[type=range]{min-height:28px;padding:0;border:0;background:none;accent-color:var(--fmw-accent)}
.fmw :focus-visible{outline:2px solid var(--fmw-fg);outline-offset:2px}
.fmw-g{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,110px),1fr));gap:10px}
.fmw-out{display:grid;gap:2px;margin-top:16px;padding:14px 16px;border-radius:12px;background:var(--fmw-field);background:color-mix(in srgb,var(--fmw-accent) 9%,var(--fmw-bg))}
.fmw-big{font-size:2em;font-weight:800;line-height:1.15;letter-spacing:-.02em;color:var(--fmw-hi);font-variant-numeric:tabular-nums}
.fmw-sub{font-size:.85em;color:var(--fmw-mute)}
.fmw-sub b{color:var(--fmw-fg);font-variant-numeric:tabular-nums}
.fmw-btn{min-height:44px;padding:0 16px;border:1px solid transparent;border-radius:10px;background:var(--fmw-accent);color:var(--fmw-on);font-weight:700;cursor:pointer}
.fmw-btn:hover{text-decoration:underline;text-underline-offset:.18em}
.fmw-ghost{border-color:var(--fmw-line);background:transparent;color:var(--fmw-fg)}
.fmw-by{display:inline-block;margin-top:14px;font-size:.75em;color:var(--fmw-mute);text-decoration:none}
.fmw-by:hover{text-decoration:underline}
.fmw-words textarea{resize:vertical;min-height:110px;line-height:1.5}
.fmw-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:12px 0 0}
.fmw-stats div{padding:10px;border-radius:12px;background:var(--fmw-field)}
.fmw-stats dt{font-size:.75em;color:var(--fmw-mute)}
.fmw-stats dd{margin:0;font-size:1.35em;font-weight:800;font-variant-numeric:tabular-nums}
.fmw-stats div:first-child dd{color:var(--fmw-hi)}
@media (max-width:420px){.fmw-stats{grid-template-columns:1fr 1fr}}
</style>
<script>
(() => {
  const lang = document.documentElement.lang || undefined;
  const num = new Intl.NumberFormat(lang);
  const min = new Intl.NumberFormat(lang, { style: 'unit', unit: 'minute', unitDisplay: 'short' });
  const sec = new Intl.NumberFormat(lang, { style: 'unit', unit: 'second', unitDisplay: 'short' });
  const seg = k => typeof Intl.Segmenter === 'function' ? new Intl.Segmenter(lang, { granularity: k }) : null;
  const wordSeg = seg('word'), charSeg = seg('grapheme');
  for (const w of document.querySelectorAll('.fmw-words:not([data-ready])')) {
    w.dataset.ready = '';
    const ta = w.querySelector('textarea'), put = (k, v) => { w.querySelector('[data-k=' + k + ']').textContent = v; };
    const run = () => {
      const t = ta.value;
      const words = wordSeg ? [...wordSeg.segment(t)].filter(s => s.isWordLike).length : (t.match(/\S+/g) || []).length;
      const chars = charSeg ? [...charSeg.segment(t)].length : [...t].length;
      const sentences = (t.match(/[^.!?。!?]+[.!?。!?]+|[^.!?。!?]*\S[^.!?。!?]*$/g) || []).filter(s => s.trim()).length;
      const s = Math.round(words / 238 * 60);   // 238 words a minute, an adult's average silent reading speed
      put('words', num.format(words));
      put('chars', num.format(chars));
      put('sentences', num.format(sentences));
      put('read', s < 60 ? sec.format(s) : min.format(Math.round(s / 60)));
    };
    ta.addEventListener('input', run);
    run();
  }
})();
</script>

Reading time badge

Counts the words of your article and shows how long it takes to read.

4.4 KB, no dependenciesFull tool
Show the code
<!-- fixmint widget: Readability checker. Free to use and change: https://fixmint.cc/widgets -->
<span class="fmw fmw-rt" data-theme="light" style="--fmw-accent:#0D795A;--fmw-on:#fff" data-for="article" data-wpm="238">
  <svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><circle cx="12" cy="12" r="9" fill="none" stroke="currentColor" stroke-width="2"/><path d="M12 7v5l3 2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>
  <b data-min>–</b> read · <span data-words>–</span> words
</span>
<style>
.fmw{--fmw-accent:#0D795A;--fmw-on:#fff;--fmw-bg:#fff;--fmw-fg:#22191D;--fmw-mute:#6A5E63;--fmw-line:#dbe3df;--fmw-field:#f3f6f4;--fmw-hi:var(--fmw-fg);--fmw-hi:color-mix(in srgb,var(--fmw-accent) 42%,#111);box-sizing:border-box;width:100%;max-width:440px;min-width:0;padding:clamp(12px,5%,20px);border:1px solid var(--fmw-line);border-radius:16px;background:var(--fmw-bg);color:var(--fmw-fg);font:inherit;line-height:1.45;text-align:left;overflow-wrap:anywhere}
.fmw[data-theme=dark]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}
@media (prefers-color-scheme:dark){.fmw[data-theme=auto]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}}
@supports not (color:color-mix(in srgb,#000,#fff)){.fmw{--fmw-hi:var(--fmw-fg)}}
.fmw *{box-sizing:border-box;min-width:0}
.fmw-t{margin:0 0 14px;font-size:1.05em;font-weight:700}
.fmw label{display:grid;gap:5px;font-size:.85em;color:var(--fmw-mute)}
.fmw input,.fmw select,.fmw textarea,.fmw button{font:inherit}
.fmw input,.fmw select,.fmw textarea{width:100%;min-height:44px;padding:9px 11px;border:1px solid var(--fmw-line);border-radius:10px;background:var(--fmw-field);color:var(--fmw-fg);font-size:1rem}
.fmw input[type=checkbox]{width:18px;height:18px;min-height:0;padding:0;accent-color:var(--fmw-accent)}
.fmw input[type=range]{min-height:28px;padding:0;border:0;background:none;accent-color:var(--fmw-accent)}
.fmw :focus-visible{outline:2px solid var(--fmw-fg);outline-offset:2px}
.fmw-g{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,110px),1fr));gap:10px}
.fmw-out{display:grid;gap:2px;margin-top:16px;padding:14px 16px;border-radius:12px;background:var(--fmw-field);background:color-mix(in srgb,var(--fmw-accent) 9%,var(--fmw-bg))}
.fmw-big{font-size:2em;font-weight:800;line-height:1.15;letter-spacing:-.02em;color:var(--fmw-hi);font-variant-numeric:tabular-nums}
.fmw-sub{font-size:.85em;color:var(--fmw-mute)}
.fmw-sub b{color:var(--fmw-fg);font-variant-numeric:tabular-nums}
.fmw-btn{min-height:44px;padding:0 16px;border:1px solid transparent;border-radius:10px;background:var(--fmw-accent);color:var(--fmw-on);font-weight:700;cursor:pointer}
.fmw-btn:hover{text-decoration:underline;text-underline-offset:.18em}
.fmw-ghost{border-color:var(--fmw-line);background:transparent;color:var(--fmw-fg)}
.fmw-by{display:inline-block;margin-top:14px;font-size:.75em;color:var(--fmw-mute);text-decoration:none}
.fmw-by:hover{text-decoration:underline}
.fmw.fmw-rt{display:inline-flex;align-items:center;gap:6px;max-width:none;padding:6px 14px 6px 10px;border-radius:99px;font-size:.88em;color:var(--fmw-mute);background:var(--fmw-field);background:color-mix(in srgb,var(--fmw-accent) 9%,var(--fmw-bg))}
.fmw-rt svg{color:var(--fmw-hi);flex:none}
.fmw-rt b{color:var(--fmw-fg)}
</style>
<script>
(() => {
  const lang = document.documentElement.lang || undefined;
  const min = new Intl.NumberFormat(lang, { style: 'unit', unit: 'minute', unitDisplay: 'short' });
  const run = () => {
    for (const w of document.querySelectorAll('.fmw-rt:not([data-ready])')) {
      w.dataset.ready = '';
      const target = document.querySelector(w.dataset.for || 'article') || document.querySelector('main') || document.body;
      const words = (target.innerText.match(/\S+/g) || []).length;
      w.querySelector('[data-min]').textContent = min.format(Math.max(1, Math.round(words / (+w.dataset.wpm || 238))));
      w.querySelector('[data-words]').textContent = new Intl.NumberFormat(lang).format(words);
    }
  };
  // Count once the whole article is there, wherever in the page the badge sits.
  if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', run); else run();
})();
</script>

Password generator

Strong passwords made with the browser’s secure random numbers.

6.2 KB, no dependenciesFull tool
Show the code
<!-- fixmint widget: Password generator. Free to use and change: https://fixmint.cc/widgets -->
<div class="fmw fmw-pass" data-theme="light" style="--fmw-accent:#0D795A;--fmw-on:#fff">
  <p class="fmw-t">Password generator</p>
  <div class="fmw-pw"><output data-pw aria-live="polite">–</output><button class="fmw-btn" type="button" data-copy data-done="Copied">Copy</button></div>
  <p class="fmw-copy-status" role="status" data-copy-status data-error="Select the password to copy it manually."></p>
  <label>Length <b data-len>20</b><input type="range" min="8" max="64" value="20" data-length></label>
  <div class="fmw-checks">
    <label><input type="checkbox" checked data-set="0123456789">Numbers</label>
    <label><input type="checkbox" checked data-set="!#$%&amp;*+-=?@^_~">Symbols</label>
  </div>
  <button class="fmw-btn fmw-ghost" type="button" data-new>New password</button>
  <a class="fmw-by" href="https://fixmint.cc/password-generator">Password generator by fixmint</a>
</div>
<style>
.fmw{--fmw-accent:#0D795A;--fmw-on:#fff;--fmw-bg:#fff;--fmw-fg:#22191D;--fmw-mute:#6A5E63;--fmw-line:#dbe3df;--fmw-field:#f3f6f4;--fmw-hi:var(--fmw-fg);--fmw-hi:color-mix(in srgb,var(--fmw-accent) 42%,#111);box-sizing:border-box;width:100%;max-width:440px;min-width:0;padding:clamp(12px,5%,20px);border:1px solid var(--fmw-line);border-radius:16px;background:var(--fmw-bg);color:var(--fmw-fg);font:inherit;line-height:1.45;text-align:left;overflow-wrap:anywhere}
.fmw[data-theme=dark]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}
@media (prefers-color-scheme:dark){.fmw[data-theme=auto]{--fmw-bg:#20171B;--fmw-fg:#eef3f1;--fmw-mute:#B2A9AA;--fmw-line:#3A2F33;--fmw-field:#2A1F23;--fmw-hi:color-mix(in srgb,var(--fmw-accent) 40%,#fff)}}
@supports not (color:color-mix(in srgb,#000,#fff)){.fmw{--fmw-hi:var(--fmw-fg)}}
.fmw *{box-sizing:border-box;min-width:0}
.fmw-t{margin:0 0 14px;font-size:1.05em;font-weight:700}
.fmw label{display:grid;gap:5px;font-size:.85em;color:var(--fmw-mute)}
.fmw input,.fmw select,.fmw textarea,.fmw button{font:inherit}
.fmw input,.fmw select,.fmw textarea{width:100%;min-height:44px;padding:9px 11px;border:1px solid var(--fmw-line);border-radius:10px;background:var(--fmw-field);color:var(--fmw-fg);font-size:1rem}
.fmw input[type=checkbox]{width:18px;height:18px;min-height:0;padding:0;accent-color:var(--fmw-accent)}
.fmw input[type=range]{min-height:28px;padding:0;border:0;background:none;accent-color:var(--fmw-accent)}
.fmw :focus-visible{outline:2px solid var(--fmw-fg);outline-offset:2px}
.fmw-g{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,110px),1fr));gap:10px}
.fmw-out{display:grid;gap:2px;margin-top:16px;padding:14px 16px;border-radius:12px;background:var(--fmw-field);background:color-mix(in srgb,var(--fmw-accent) 9%,var(--fmw-bg))}
.fmw-big{font-size:2em;font-weight:800;line-height:1.15;letter-spacing:-.02em;color:var(--fmw-hi);font-variant-numeric:tabular-nums}
.fmw-sub{font-size:.85em;color:var(--fmw-mute)}
.fmw-sub b{color:var(--fmw-fg);font-variant-numeric:tabular-nums}
.fmw-btn{min-height:44px;padding:0 16px;border:1px solid transparent;border-radius:10px;background:var(--fmw-accent);color:var(--fmw-on);font-weight:700;cursor:pointer}
.fmw-btn:hover{text-decoration:underline;text-underline-offset:.18em}
.fmw-ghost{border-color:var(--fmw-line);background:transparent;color:var(--fmw-fg)}
.fmw-by{display:inline-block;margin-top:14px;font-size:.75em;color:var(--fmw-mute);text-decoration:none}
.fmw-by:hover{text-decoration:underline}
.fmw-pw{display:flex;gap:8px;align-items:stretch;margin-bottom:14px}
.fmw-pw output{flex:1;min-width:0;display:flex;align-items:center;padding:8px 12px;border-radius:10px;background:var(--fmw-field);font:600 1em/1.35 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;word-break:break-all}
.fmw-copy-status{margin:0;color:var(--fmw-mute);font-size:.85em}
.fmw-copy-status:not(:empty){margin:-6px 0 12px}
.fmw-pass>label{margin-bottom:10px}
.fmw-pass label b{color:var(--fmw-fg)}
.fmw-checks{display:flex;flex-wrap:wrap;gap:4px 16px;margin-bottom:14px}
.fmw-checks label{display:flex;align-items:center;min-height:44px;gap:8px;font-size:.92em;color:var(--fmw-fg)}
</style>
<script>
(() => {
  const ABC = 'abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ';   // no l, I or O: easy to read back
  const pick = n => {   // an unbiased random index below n
    const max = Math.floor(2 ** 32 / n) * n, a = new Uint32Array(1);
    do crypto.getRandomValues(a); while (a[0] >= max);
    return a[0] % n;
  };
  for (const w of document.querySelectorAll('.fmw-pass:not([data-ready])')) {
    w.dataset.ready = '';
    const $ = s => w.querySelector(s), out = $('[data-pw]'), len = $('[data-length]'), copy = $('[data-copy]');
    const status = $('[data-copy-status]'), label = copy.textContent;
    let copying = false, timer;
    const resetCopy = () => {
      clearTimeout(timer);
      copy.textContent = label;
      status.textContent = '';
    };
    const run = () => {
      resetCopy();
      const sets = [ABC, ...[...w.querySelectorAll('[data-set]')].filter(c => c.checked).map(c => c.dataset.set)];
      const pool = sets.join(''), n = +len.value;
      let pw;
      do pw = Array.from({ length: n }, () => pool[pick(pool.length)]).join('');
      while (!sets.every(s => [...pw].some(ch => s.includes(ch))));   // at least one of each chosen kind
      out.textContent = pw;
      $('[data-len]').textContent = n;
    };
    copy.addEventListener('click', async () => {
      if (copying) return;
      copying = true;
      resetCopy();
      const password = out.textContent;
      try {
        await navigator.clipboard.writeText(password);
        if (out.textContent !== password) return;
        copy.textContent = copy.dataset.done;
        timer = setTimeout(resetCopy, 1400);
      } catch {
        status.textContent = status.dataset.error;
      } finally {
        copying = false;
      }
    });
    $('[data-new]').addEventListener('click', run);
    w.addEventListener('input', run);
    run();
  }
})();
</script>

fixmint beyond the browser: widgets, CLI, MCP server and extension

Watch with chapters

Add one in a minute

  1. Pick a colour and a theme above.
  2. Copy a widget’s code.
  3. Paste it into your page’s HTML, where the widget should appear.

Questions

Are the widgets free to use?

Yes, on any site, personal or commercial. Change the code as you like. The small fixmint link at the bottom is welcome but you may remove it.

Do the widgets track my visitors?

No. Each snippet is plain HTML, CSS and JavaScript that runs inside your page. It loads nothing from fixmint or anyone else and sends nothing anywhere.

How do I change the language of a widget?

Every word is plain text in the HTML part of the snippet, so you can rewrite it. Numbers, dates and times follow the lang attribute of your page.

Will a widget clash with my site’s CSS?

Every class starts with fmw-, so the widget leaves the rest of your page alone. It takes your page’s font, and you can override any of its colour variables.

Can I use them in WordPress, Webflow, Wix or Squarespace?

Yes. Paste the snippet into a Custom HTML block (WordPress), an Embed element (Webflow, Wix) or a Code block (Squarespace).

Can I show amounts in a currency?

In the loan and bill widgets, set data-currency to a currency code such as USD, EUR or GBP, and amounts are shown with that currency, in the number format of your page’s language.

Rather work in a terminal? Get fixmint for the command line