A sleek and simple currency converter web app built using HTML, CSS, and JavaScript. It fetches real-time exchange rates using an API and supports features like currency swapping, conversion rate display, and dark mode.
🔗 (https://erleen0307.github.io/currency-converter/)
- ✅ Convert between over 150 currencies
- 🔁 Swap From/To currencies with one click
- 💹 Display of conversion rate
- 🌙 Dark Mode for better visual experience
- 📱 Fully responsive design for all devices
- HTML5
- CSS3
- Vanilla JavaScript
- ExchangeRate API
- REST Countries API
- FlagCDN API
currency-converter/
│
├── preview-light-mode.png
├── preview-dark-mode.png
├── index.html # Main HTML file
├── style.css # Styling (responsive + dark mode)
└── script.js # API fetch + DOM handling
This project uses the following APIs:
-
ExchangeRate.host API
- 📈 Provides real-time currency conversion rates.
- Example:
https://api.exchangerate.host/latest?base=USD&symbols=INR
-
Rest Countries API (v3.1)
- 🌍 Used to fetch country codes and relevant metadata.
- Example:
https://restcountries.com/v3.1/all
-
FlagCDN API
- 🏳️ Used to dynamically display country flags based on currency/country codes.
- Example:
https://flagsapi.com/US/flat/64.png
- Enter the amount and choose From/To currencies.
- Click "Convert" to get the latest rate.
- Use the "Swap" button to switch currencies instantly.
- Toggle dark mode with the theme switch (if included).
- DOM manipulation using JS
- Working with real-world APIs
- Responsive design and accessibility
- Handling dynamic content with JavaScript