GIFT Format Converter

GIFT Format Converter: Turn Questions into a Moodle GIFT File

GIFT is the Moodle text format that handles more than multiple choice: true or false, short answer, matching, numerical, missing word and essay questions. Learn the exact syntax below, or upload a document and let Formswrite write the GIFT file for you.

What is GIFT format?

GIFT (General Import Format Template) is a plain-text format Moodle uses to import questions into a question bank. Each question is written on its own, with the answers inside curly braces. It covers more question types than Aiken, which only does single-answer multiple choice.

  1. Separate questions with a blank line.
  2. Put the answers inside curly braces { } after the question text.
  3. Mark the correct answer with = and each wrong answer with ~.
  4. Give a question an optional title between double colons, like ::Q1::, at the start.
  5. Add feedback to an answer with # right after it.
  6. Escape the special characters ~ = # { } : with a backslash when they are part of the text.
  7. Save the file as plain text in UTF-8, then import it in Moodle under Question bank, Import, GIFT format.

Example 1: the main question types

Multiple choice, true or false, short answer, matching and numerical, each separated by a blank line.

::Capital::What is the capital of France? {
=Paris
~Madrid
~Rome
}

The Sun is a star. {T}

Name the largest planet in our solar system. {=Jupiter =jupiter}

Match each country with its capital. {
=France -> Paris
=Japan -> Tokyo
=Kenya -> Nairobi
}

What is pi to two decimal places? {#3.14:0.01}

Example 2: common mistakes that break the import

This file will not import cleanly. There is no blank line between the questions, the colon in the second question is not escaped, and the multiple choice question has no correct answer marked with =.

Which gas do plants absorb? {
~Oxygen
~Carbon dioxide
~Nitrogen
}
Ratio check: is 1:2 the same as 2:4? {T}

Example 3: the same questions, fixed

A blank line between questions, the colon escaped with a backslash, and the correct answer marked with =.

Which gas do plants absorb? {
~Oxygen
=Carbon dioxide
~Nitrogen
}

Ratio check: is 1\:2 the same as 2\:4? {T}

Fixing a long question bank by hand is slow. Formswrite applies these rules when it converts a document, and the same questions can go to Moodle as GIFT, Aiken or Moodle XML.

How it works

Turn a document of questions into a Moodle-ready GIFT file in three steps.

  1. Pip

    Upload or paste your questions

    Add a Word file, PDF, Google Doc or a pasted list. Formswrite reads each question, its answers and the correct one.

    Upload a document Upload or paste your questions
  2. Nova

    Check the questions

    Review the extracted questions, fix anything the document left unclear and pick the question types.

    Try it free Check the questions
  3. Kiki

    Download the GIFT file

    Export as GIFT and import it in Moodle under Question bank, Import, GIFT format.

    Convert to GIFT Download the GIFT file

The GIFT syntax at a glance

The patterns Moodle reads for each question type. Formswrite writes them for you.

Question typeGIFT syntax
Multiple choice{ =correct ~wrong ~wrong }
True or false{T} or {F} (also {TRUE} or {FALSE})
Short answer{ =answer =another accepted answer }
Matching{ =item -> match =item -> match }, at least three pairs
Numerical{#answer:tolerance}, for example {#3.14:0.01}
Missing wordBraces inside the sentence: The sky is {=blue ~green} today.
EssayEmpty braces {} after the question text
Partial creditA weight after ~, for example ~%50%half right
  • Only multiple choice?

    For a plain list of single-answer multiple choice questions, Aiken format is simpler and harder to get wrong.

  • Other formats and platforms

    The same questions also export to Moodle XML, QTI, Canvas, Blackboard, Kahoot and more. See Documents to Moodle. To check a file before you import it, see the quiz file format rules.

GIFT format FAQ

What is GIFT format in Moodle?
GIFT is a plain-text format for importing questions into a Moodle question bank. Each question has its answers in curly braces, with = for the correct answer and ~ for wrong answers. It supports multiple choice, true or false, short answer, matching, numerical, missing word and essay questions.
How do I import a GIFT file into Moodle?
In your course, open the Question bank, choose Import, select GIFT format, upload the .txt file and confirm. Moodle shows each question it imported, so you can check the list before using the questions in a quiz.
What is the difference between GIFT and Aiken format?
Aiken only handles single-answer multiple choice and is very strict about layout. GIFT covers more question types, feedback, partial credit and question titles. Use Aiken for a quick list of multiple choice questions and GIFT when you need anything else.
Why does my GIFT import fail?
The usual causes are a missing blank line between questions, an unescaped special character (~ = # { } :) in the question text, a multiple choice question with no answer marked =, or a file that is not saved as UTF-8 plain text.
Can I convert a Word or PDF document to GIFT?
Yes. Upload the document to Formswrite, check the extracted questions and export as GIFT. It also exports the same questions to Aiken, Moodle XML, QTI and other formats.
Does GIFT support images?
GIFT itself is text. You can reference images with HTML in the question text, but the image must already be hosted somewhere Moodle can reach. For questions with images, Moodle XML is usually the better choice because it can carry the files.

GIFT format guides

Convert to GIFT

Start free, no credit card. No manual reformatting and no add-on to install.