Convert CSV to QTI for Canvas: The Format Bridge, Explained
You already have a .csv — exported from a gradebook, a survey tool, an older LMS, or a colleague's template. Canvas will not read it. What it wants is QTI 1.2, a packaged XML quiz format. "Convert CSV to QTI" sounds like a one-click rename, but it is really a translation: your flat rows carry none of the structure QTI requires. This article explains what actually has to happen, shows the question-type mapping, and lists the pitfalls that quietly break imports.
What QTI 1.2 actually is
QTI (Question and Test Interoperability) 1.2 packages a quiz as a .zip containing an imsmanifest.xml plus one XML item per question. Each item encodes the stem, the options, the answer key, feedback, and points. Canvas's importer walks that manifest and rebuilds the quiz in its own database. A raw CSV has none of that — just text in columns — which is why the bridge is necessary.
Why a CSV alone is not enough
- No answer-key semantics. A CSV cell might say "B" or "correct" or "1". QTI needs an explicit, machine-checkable key.
- No question types. "Multiple choice" vs "Select all that apply" vs "True/False" change how the key is interpreted. The CSV must declare the type.
- No scoring structure. Points per item, partial credit, and feedback live outside a plain CSV.
The conversion pipeline
Validate the CSV
Confirm UTF-8 encoding, one question per row, and that every row has a type and a well-formed answer key. Catch BOM and comma-in-cell issues here.
Map columns to meaning
Stem → question text, option columns → choices, answer column → key, a points column → scoring. Column order is irrelevant; only the meaning matters.
Assign type codes
Free-text labels ("multiple choice") become compact codes the exporter understands, so each item becomes the right QTI interaction.
Build the answer keys
Resolve the correct option to a 1-based index over the option cells; group multiple correct answers for "select all" items.
Emit the QTI package
Write imsmanifest.xml + item XML into a .zip Canvas can import.
Question-type mapping table
This is the part most people get wrong. Here is how common types map from a CSV row to QTI 1.2:
| Question type | How it looks in your CSV | What QTI 1.2 needs |
|---|---|---|
| Multiple choice | One correct option among A–D | MC type, single 1-based answer index |
| Multiple answer (select all) | Two or more correct options | MR type, grouped answer indices |
| True / False | Two options, one correct | TF type, index to True/False |
| Short answer | A text field, optional accepted answers | SA type, no fixed options |
| Essay | Open prompt, manual grading | ES type, zero auto-key |
| Matching | Prompt–answer pairs | MA type, paired items |
Pitfalls that break the import
- UTF-8 BOM. A byte-order mark at the start of the file can corrupt the first column header. Save as plain UTF-8.
- Commas inside values. An unquoted comma in a question splits one cell into two. Quote or escape them.
- Answer index out of range. Pointing at option 5 when there are only 4 options drops the row silently.
- Mismatched type. Labeling a "select all" item as "multiple choice" loses the extra correct answers.
- Unsupported types. Exotic interactions may have no QTI 1.2 equivalent; convert them to the nearest supported type or handle manually.
Validate before you import
A 30-second pre-flight saves a re-import cycle: confirm the row count matches your question count, spot-check three answer keys, and open the QTI in a validator if your converter provides one. Then import via Quizzes → More options → Import in Canvas.
How ExamParser handles CSV → QTI
ExamParser reads your CSV (or Excel) in whatever layout you already use, normalizes the columns into a standard structure, assigns the correct type codes, builds the answer keys, and exports a Canvas-ready QTI 1.2 package — and it can also flatten QTI back to CSV for round-trip editing. The same converter covers other LMS targets, so one source file can feed several platforms.
More format guides live at examparser.com/blog/en.
Frequently asked questions
What QTI version does Canvas import?
Canvas's quiz import accepts QTI 1.2 (and, in practice, IMS QTI packages produced by common converters). QTI 2.x is not the format Canvas's importer expects, so target 1.2 unless your institution documents otherwise.
Can I convert a QTI package back to CSV?
Yes, the mapping is reversible in principle: each QTI item's stem, options, and answer key can be flattened back into rows. A good converter supports both directions so you can edit in a spreadsheet and re-export.
My CSV has images embedded in cells. Will they survive?
Not if they are pasted inside a cell. QTI references images as separate files inside the package. Convert images to file references (for example a token like @image.png@ alongside an images folder) before export so the converter can bundle them.
Will formulas or formatting in my CSV break the conversion?
Export the sheet as plain CSV first so formulas become their computed values. A CSV has no styling, so bold/color is lost — that is expected. The converter only reads text values, types, and the answer key.
Convert your CSV now
Upload the CSV you already have and get a Canvas-importable QTI 1.2 package — no manual XML, no rigid template.
Try ExamParser →