Skip to content

A simple and interactive Currency Converter built using HTML, CSS, and JavaScript that lets users convert values between any two currencies in real-time. It fetches the latest exchange rates from the @fawazahmed0/currency-api and also displays corresponding country flags for each currency.

Notifications You must be signed in to change notification settings

VijayVPatil13/Currency-Converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Currency-Converter

A simple and interactive Currency Converter built using HTML, CSS, and JavaScript that lets users convert values between any two currencies in real-time. It fetches the latest exchange rates from the @fawazahmed0/currency-api and also displays corresponding country flags for each currency.

Features

  • Real-time currency conversion using live exchange rates
  • Automatically updates flags based on selected currencies
  • Reverse currency button to swap “From” and “To” values
  • Default conversion on page load (USD → INR)
  • Responsive and clean UI design

Tech Stack

  • HTML5 – Structure and layout
  • CSS3 – Styling and responsive design
  • JavaScript (ES6) – API integration and logic
  • Font Awesome – For the swap icon
  • FlagsAPI – For displaying country flags
  • Fawaz Ahmed Currency API – For real-time currency data

Project Structure currency-converter/ │ ├── index.html # Main HTML structure ├── style.css # Styling and layout (user-defined) ├── codes.js # Country and currency mapping └── app.js # Core JavaScript logic and API integration

How It Works

  1. The codes.js file contains a countryList object that maps currency codes (USD, INR, EUR) to country codes (US, IN, FR).
  2. The dropdowns are populated dynamically using this list.
  3. When the user clicks Convert, the app:
  4. Clicking the swap icon reverses the currencies and refreshes the result.
  5. On page load, the converter runs automatically with default values (USD → INR).

Example API Response

References

Usage in Code:

const rate = data["usd"]["inr"];

About

A simple and interactive Currency Converter built using HTML, CSS, and JavaScript that lets users convert values between any two currencies in real-time. It fetches the latest exchange rates from the @fawazahmed0/currency-api and also displays corresponding country flags for each currency.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published