What's included
- Six categories out of the box
- Swap button
- Handles temperature formulas separately
- Remembers the last category
- Number keyboard on phones
Who it's for
- Trades: builders, tailors, cooks, pilots
- Branded utility for a hardware or kitchen shop
- Classroom maths aid
- A starting point for any calculator app
Files in the ZIP
| File | What it does |
|---|---|
index.html | Page shell with the viewport and safe-area settings |
style.css | Layout, colours and automatic dark mode |
data.js | Your content — the only file most people edit |
app.js | The app's behaviour; saves data on the phone with localStorage |
README.txt | Short instructions |
Fields in data.js
| Field | Meaning |
|---|---|
categories | Each category maps unit names to how many base units one of them equals (e.g. km: 1000 metres). |
Temperature | Uses the special codes c, f and k instead of factors. |
name / tagline / accent | Branding. |
Build it into an APK
- Customise. Change the name, colour and content in the panel, or edit data.js after downloading.
- Download the ZIP. The ZIP has index.html at the top level, ready to build.
- Build the APK. Open HTML & ZIP to APK on your Android phone, choose the ZIP, set the icon and build.
- Install and share. Install the signed APK, or build an AAB with Pro for Google Play.
Make it your own
Add a currency category with rates you update each release, or a cooking category with cups, grams of flour and sticks of butter. The same structure works for any 'enter a number, get a number' tool.
Why no frameworks? Plain scripts and a data.js file work when an app opens its files directly from storage, where ES modules and fetch() can fail. See relative paths for offline apps and making a web app feel native.
Questions
How do I add a unit?
Add it to a category with its size in that category's base unit — for example "fathom": 1.8288 under Length (metres).
Why is temperature different?
Temperature scales have offsets, not just factors, so the template converts them with formulas.
Can I add currency conversion?
Yes, with fixed rates you update when you rebuild. Live rates need an internet API and a URL app or extra code.