Aspect ratio calculator / Free Widgets for Your Website

Free Widgets for Your Website

Small calculators you can place on your own page with one piece of code.

This is the live widget. Try it.

What a widget is here

A small working calculator that you place inside your own web page. Your visitors use it without leaving your site. You paste one piece of code; there is nothing to install, no account and no cost. Four are ready:

WidgetWhat it doesHeight
Aspect ratio calculatorWidth and height in, ratio out. Type a new width and it gives the height that keeps the shape.300 px
Length converterMillimetres to miles: mm, cm, m, km, inches, feet, yards, miles, nautical miles.300 px
Area converterSquare metres, square feet, acres, hectares, pyeong and more.300 px
TV and monitor sizeA diagonal in inches and a shape in, width and height out, in inches and centimetres.232 px

How to add one to your page

  1. Choose the widget and its look in the builder above.
  2. Press Copy the code.
  3. Paste it where HTML is allowed: a “Custom HTML” block in WordPress, an “Embed” or “Code” block in most site builders, or straight into your own HTML file.

The widget fills the width it is given, up to the widest size you set, so it also fits a phone. Tools that take only an address instead of code can be given the address inside the code: the part that starts with https://aspect.tools/w/.

Options

The builder writes these for you. They go at the end of the address, after a question mark, joined with &.

OptionWhat it doesExample
themeLight or dark. Leave it out and the widget follows each visitor’s own setting.?theme=dark
accentThe colour of the link and the focus ring, as a hex code without #.?accent=e0662a
w, hStarting width and height (ratio widget).?w=1080&h=1350
from, to, vStarting units and value (length and area widgets).?from=ft&to=m&v=6
d, ratioStarting diagonal and shape (TV widget).?d=65&ratio=21:9

The credit line

Each widget has a small “aspect.tools” link in its corner. The builder can also add one line of text under the widget that links back to the full tool. That line is optional: untick the box and the code is only the widget. If the widget is useful to you, leaving the line in is the way to say thanks.

Privacy and speed

  • A widget is one small file, about 5 KB, with no libraries, no fonts to download and no trackers.
  • Everything is calculated in the visitor’s browser. What they type is not sent anywhere.
  • It loads only when it scrolls into view, so it does not slow the rest of your page.

Questions

Are the widgets free?

Yes, for personal and commercial sites. There is no account and no limit.

Do I have to keep the credit line?

No. The line under the widget is optional. The small aspect.tools link inside the widget stays.

Will a widget slow my site down?

Hardly. It is one file of about 5 KB with no libraries, and it loads only when it comes into view.

Does it work in dark mode?

Yes. By default it follows each visitor's light or dark setting, or you can fix it with the theme option.

Can I change the size?

The width follows the space you give it, up to the widest size in the code. The height is fixed for each widget so nothing is cut off.

Related tools and guides