The Unit Converter is a Streamlit-based web application that allows users to easily convert between different Length, Mass, and Time units. Built with Python, Streamlit, and Pint, this app provides accurate and efficient unit conversions with a simple and user-friendly interface.
✅ Convert between Length, Mass, and Time units effortlessly
✅ Supports various units such as meters, kilometers, grams, pounds, seconds, hours, etc.
✅ User-friendly interface with dropdown selections for input and output units
✅ Handles errors gracefully for invalid conversions
✅ Built-in custom styling for an enhanced user experience
- Python 🐍
- Streamlit (for the web interface)
- Pint (for unit conversion)
- Clone the repository
git clone https://github.com/yourusername/unit-converter.git cd unit-converter
- Create a virtual environment (optional but recommended)
python -m venv env source env/bin/activate # For macOS/Linux env\Scripts\activate # For Windows
- Install dependencies
pip install -r requirements.txt
- Run the app
streamlit run app.py
- Open the Unit Converter web app.
- Select a conversion category (Length, Mass, or Time).
- Enter the value and choose the "From" and "To" units.
- Click to get the converted value instantly!
📏 Length: Meter, Kilometer, Centimeter, Millimeter, Micrometer, Nanometer, Mile, Yard, Foot, Inch
⚖️ Mass: Kilogram, Gram, Milligram, Microgram, Ton, Pound, Ounce
⏳ Time: Second, Minute, Hour, Day, Week, Year
🔹 10 kilometers = 6.2137 miles
🔹 500 grams = 1.1023 pounds
🔹 3600 seconds = 1 hour
This project is open-source under the MIT License.
📧 Have suggestions? Want to contribute? Feel free to fork the repo, submit pull requests, or contact me at adnanshaikh84482@gmail.com.
🚀 Happy Converting! 🎉