Convert a Word Multiple-Choice Exam to JSON, GIFT or CSV
Read a Vietnamese multiple-choice exam from Word or text ("Câu 1. … A. … B. …") with its answers and export JSON, GIFT, Aiken, Moodle XML or Quizizz CSV.
Result
Press “Run” to see the result.
Send an exam as a Word file (.docx) or plain text written the usual Vietnamese way: questions start with Câu 1. / Câu 1: (or 1. when no "Câu" is used), options with A. B. … on separate lines or on one line separated by tabs, and true-false statements with a) b) …. The parser follows the 2025 THPT exam structure: PHẦN I multiple choice, PHẦN II true / false statements, PHẦN III short answers, and keeps reading passages ("Đọc đoạn văn sau và trả lời câu hỏi từ 4 đến 5") as groups.
The correct answer is found the way teachers mark it: an underlined option letter, red or highlighted text, a bold letter when the others are not, a * before the letter, an Đáp án: B line under the question, or an answer table at the end (BẢNG ĐÁP ÁN, 1.B 2.C …, a table of numbers and letters, ĐSĐS for true-false). Explanations (Lời giải:, Hướng dẫn giải:) are kept. Images in the Word file come back as data URIs with [img:img1] markers in the text; equations (OMML) are read as plain text.
format converts the result: gift and moodle_xml for Moodle, aiken, quizizz_csv (Quizizz spreadsheet template), kahoot_csv (columns of the Kahoot template) and a generic csv for Google Sheets / Forms add-ons. Warnings list questions without an answer, duplicate numbers or texts and odd option counts. Files are processed in memory and not stored.
Use this in your code
curl -X POST "https://apibox.io.vn/v1/vn-quiz-parse" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Câu 1. Thủ đô của Việt Nam là\nA. TP. Hồ Chí Minh\t*B. Hà Nội\nC. Đà Nẵng\tD. Huế\nCâu 2. 2 + 2 = ?\nA. 3\nB. 4\nC. 5\nD. 6\nĐáp án: B\nLời giải: 2 + 2 = 4."}'const res = await fetch('https://apibox.io.vn/v1/vn-quiz-parse', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"text": "Câu 1. Thủ đô của Việt Nam là\nA. TP. Hồ Chí Minh\t*B. Hà Nội\nC. Đà Nẵng\tD. Huế\nCâu 2. 2 + 2 = ?\nA. 3\nB. 4\nC. 5\nD. 6\nĐáp án: B\nLời giải: 2 + 2 = 4."
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://apibox.io.vn/v1/vn-quiz-parse",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"text": "Câu 1. Thủ đô của Việt Nam là\nA. TP. Hồ Chí Minh\t*B. Hà Nội\nC. Đà Nẵng\tD. Huế\nCâu 2. 2 + 2 = ?\nA. 3\nB. 4\nC. 5\nD. 6\nĐáp án: B\nLời giải: 2 + 2 = 4."},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/vn-quiz-parse');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"text":"Câu 1. Thủ đô của Việt Nam là\\nA. TP. Hồ Chí Minh\\t*B. Hà Nội\\nC. Đà Nẵng\\tD. Huế\\nCâu 2. 2 + 2 = ?\\nA. 3\\nB. 4\\nC. 5\\nD. 6\\nĐáp án: B\\nLời giải: 2 + 2 = 4."}',
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));API documentation → Get a free API key
FAQ
How must the correct answer be marked?
Any common way: underlined or red / highlighted option, a "*" before the letter, an "Đáp án: B" line, or an answer table at the end. The first marking style that singles out options in a question is used.
Are old .doc files and MathType equations supported?
Save .doc files as .docx first. Word equations are read as text; MathType objects only come through as their preview image.
Does it handle the 2025 THPT format?
Yes: parts I (4 options), II (true-false statements a–d, answers like ĐSĐS) and III (short answer) are recognised, with numbering restarting in each part.