An AI-powered web application that generates multiple-choice questions (MCQs) from any given text, file, or URL. This tool is designed to help teachers, students, and content creators quickly generate quizzes and exam questions with customizable settings.
-
Multiple Input Options:
- Text: Paste your text directly.
- File Upload: Upload TXT files (currently, TXT is fully supported; PDF/DOCX processing coming soon).
- URL Extraction: Provide a URL to scrape text content.
-
Customizable Quiz Settings:
- Set the number of questions (e.g., 5 to 20).
- Choose difficulty levels (Easy, Medium, Hard).
- Option to include answer explanations.
-
Interactive Quiz Interface:
- Options are initially neutral and clickable.
- On selection, the chosen option turns green if correct or red if wrong.
- Correct answers remain hidden until an option is selected.
- Explanations are shown only after an answer is chosen.
-
Export Options:
- Copy quiz content to clipboard.
- Export questions to a text file.
-
AI-Powered Question Generation:
- Uses the free DeepSeek model via the OpenRouter API to generate questions automatically.
- React with TypeScript
- Vite (build tool)
- Tailwind CSS (styling)
- OpenRouter API (using the free DeepSeek model)
- Lucide React (icons)
-
Clone the Repository:
git clone https://github.com/abdulwaheedal/MCQ-Generator-free.git cd MCQ-Generator-free -
Install Dependencies:
npm install
-
Configure Environment Variables:
Create a
.envfile in the root directory and add your OpenRouter API key:VITE_OPENROUTER_API_KEY=your_openrouter_api_key_here
-
Start the Development Server:
npm run dev
-
Open in Browser:
Navigate to
http://localhost:5173(or the port specified by Vite).
-
Choose an Input Method:
Select whether to paste text, upload a file, or enter a URL. -
Provide Your Input:
Enter your text, upload a TXT file, or provide a URL for content extraction. -
Customize Quiz Settings:
Adjust the number of questions, set the difficulty level, and choose whether to include explanations. -
Generate MCQs:
Click on "Generate MCQs" to see the questions appear interactively. -
Interact with the Quiz:
Click on the options. The selected option will change color based on correctness:- Green if correct.
- Red if incorrect (with the correct answer then highlighted in green).
-
Export or Copy:
Use the provided buttons to export the quiz to a text file or copy it to your clipboard.
The application is deployed and available at: https://sprightly-semolina-fb4b83.netlify.app/
Contributions are welcome! If you have suggestions or improvements, please fork the repository and open a pull request. For major changes, consider opening an issue first to discuss your ideas.
This project is not yet licensed
- Developed by Faaiz.
- Icons provided by Lucide React.
- AI question generation powered by the DeepSeek model via OpenRouter API.