Skip to content

Conversion Tool Intro


Need to convert feet to meters? Liters to teaspoons?

You’ve come to the right place!

About the Converter
The JavaScript Unit Converter (JSUC) is an HTML/JavaScript unit conversion utility. It's a small (20KB), fast, self-enclosed, completely customizable script file that can be downloaded and run locally. JSUC can convert between several different units in a number of physical properties: it can convert between Celsius and Fahrenheit, inches and meters, mph and kph and a lot of other esoteric units you've probably never heard of.

A
B

Conversion Tool How To


How to use it

There are three drop down menus: 1) a menu labeled "Property," 2) one labeled "A," and, 3) another labeled "B." The "Property" menu lists all the different properties written in JSUC; it defaults to the first one, usually "Acceleration," but you can select anyone you wish by dropping down the menu. When you select a property, the options in the "A" and "B" menus are automatically updated to the supported units of the selected property.

Say you want to convert 75 mph to kph:

Select "Velocity & Speed" from the "Property" menu: Both "A" and "B" menus default to 'Meter/Second (m/sec)."
Select 'Mile (US)/hour (mph)' in menu "A" (you could use B, it doesnt really matter).
Select "Kilometer/hour (kph)" in menu "B".
Plug "75" (no quotes) in the input box next to menu "A".
Hit the button "Convert to B" which is next to the box you entered "75" in.
You should get something approximately equal to 120.709 kph (depending on the accuracy of the machine you are using). Now, if you are a European, you can go ahead and laugh...
Reference Data

Some handy constants and other frequently used numbers.

Constants
  Physics
     Speed of light: c = 2.997925E8 m/s
     Electron charge: e = 1.6021E-19 Cb
     Electron mass: m = 9.11E-31 kgr
     Faraday's constant: F = 9.6487E4 Cb/mol
     Plank's constant: h = 6.6256E-34 J sec
     Rydberg constant: R = 1.097373E7 1/m
     Bohr radius: ao = 5.29167E-11 m
     Gravitational constant: G = 6.67E15 n m^2 / kg^2
     Permitivity of free space: eo = 8.85E-12 Cb^2/ Nm^2
     Permeability of free space: mu o = 4*piE-7 N/A^2
  Chemistry &Thermodynamics
     Avogadro's constant: Na = 6.02252E23 1/mol
     Boltzman's constant: k = 1.380622E-23 J/'K
     Universal gas constant: R = 8.3143 J / 'Kmol
   Earth Science
     Mean distance of Earth to Sun: 1.5E14 m
     Mass of the Sun: 1.99E30 kgr
     Mass of the Earth: 5.97E24 kgr  Standard Atmosphere at Sea Level
    Density rho = 1.225 kgr/m^3
    Temperature = 288.2 'K
    Pressure = 101300 Pa
    Viscosity = 1.79E5 Nsec / m^2
Ideal Gas Properties
  Air
     Molecular mass: 28.967
     Gas constant: 287 J/ kgr'K
     cp = 1004 J/ kg'K (at 25'C)
     gamma = 1.4 (at 25'C)
   Water Vapor>
     Molecular mass: M = 18.015
     Gas constant: R = 461.5 J/kgrK
     cp = 1866 J/kgrK (at 25 'C)
     gamma = 1.33 (at 25 'C)
     Triple
 

A Note from the Author:

JSUC is written to be self-enclosed and autonomous: you can download it to your hard disk or UNIX account and use it from your own browser, without putting too much strain on the already overworked Nyx. You can do that by right-clicking (or holding down the mouse button for Macs) on the Current JSUC link and select"Save Link As..." or something else to that effect. Then, by using the File menu command for opening a local file (depending on your browser) you can run your local copy. Since the JSUC file is only about 20k it should be blazingly fast on most systems. The "Current JSUC" link provides you with a live link to my copy of JSUC, so you can re-download it for any updates or changes.

I wrote JSUC as an exercise in JavaScript: I ain't saying it's perfect or it can't be done better. I just think it's a nifty thing to have around, especially if you are an engineer or a scientist, stuck on an obscure unit and all you've got is some high-end workstation where no one bothered to write a utility like this.

Because JSUC is essentially a big script, all the source code is there for anyone to see; you are free to do what you want with it: change it, deface it, customize it, add to it. If you do, please read the comments in the actual file to guide you and give me a credit somewhere.

--Costas Malamas