A real-time currency converter built with HTML, CSS, and JavaScript. This application fetches exchange rates from exchangerate-api.com and country flags from flagsapi.com. By default, it shows the conversion from 1 USD to INR. If the user inputs 0 or leaves the input box empty, it automatically sets the value to 1 and displays the result. The application supports a list of 160 countries. It is also comes with responsiveness.
- Real-time currency conversion using exchange rates fetched from exchangerate-api.com.
- Displays country flags using flagsapi.com.
- Default conversion from 1 USD to INR.
- Handles zero or empty input by setting the value to 1.
- Supports conversion between 160 different currencies.
- Swap button to switch between 'from' and 'to' currencies with a smooth transition.
- Responsive.
index.html
: The main HTML file containing the structure of the currency converter.style.css
: The CSS file for styling the currency converter.script.js
: The JavaScript file containing the main logic for fetching data and updating the UI.codes.js
: A JavaScript file containing the country codes and corresponding currency codes.
- Clone the repository:
git clone https://github.com/yourusername/repo-name.git
- Navigate to the Project Directory
cd repo-name
- Open
index.html
in your web browser. - Enter the value you want to convert in the input box.
- Select the 'from' and 'to' countries from the dropdown lists.
- Click the convert button to see the exchange rate.
- Use the swap button to switch the 'from' and 'to' countries.
- Enter the value:
1
- Select 'from' country:
United States (USD)
- Select 'to' country:
India (INR)
- Click the convert button to see the exchange rate.
Check out for live demo Here.
This project is licensed under the MIT License - see the LICENSE file for details.
- Exchange rates provided by exchangerate-api.com
- Country flags provided by flagsapi.com