Mochi Documentation


n. (餅) A Japanese rice cake made from glutinous rice.

n. (持ち) having; holding; possessing; durability

Mochi is an app to help you remember things. It uses a flash card system called spaced repetition. This system will automatically schedule cards for review based on how well you already know them. Cards that you know well will appear less often, and cards you don't know well will appear more frequently.


All cards are stored in a deck. Decks can also be stored in other decks to create hierarchies. Decks can have custom review settings, or inherit settings from their parent, or the global settings if they have no parent.

Decks can be displayed in a few different ways. Grid view, List view, Column view, and Notebook view are all available depending on your needs. You can change the view in the upper left-hand corner of the deck page.


Decks can be shared in a couple of different ways. Either by exporting a copy of your deck and sending it to a friend so that they can import. Or by publishing it to the web and sharing it with a link.

Exported .mochi files are just zip archives with a collection of attachments and a JSON text file. If you want to edit an export, or create one manually, simply rename the .mochi file to a .zip file to extract it.


Decks can be published to the web. Anyone with a link to the published deck can view that deck in the browser or in the Mochi app. They can also clone the deck to their own collection and start reviewing or editing without affecting your deck.


Cards are really the heart of Mochi. They are formatted using markdown and can have one or more discrete "sides" separated by three dashes (---). The sides act sort of like the answer/question of traditional flash cards. When you review a card you can gradually reveal each side.

Cards can either be used as flash cards with the spaced repetition system, or simply as note cards. If you don't want to review your note cards, you can archive them. Mochi works particularly well as a zettelkasten notebook.


Templates speed up card creation by allowing you to re-use the same layout for all of your cards. There are two important concepts to understand when it comes to using templates:


Templates look like normal markdown notes. You can use all of the same markdown features including HTML in your templates. The content of the template will be applied to any card that uses that template. The difference is that templates can access field values in a card. You can add field values to your template by using this syntax: << My Field >>. Templates use Mustache to render fields, so you can also use conditional tags like <<# My Field >> foobar <</ My Field>> to only display "foobar" when My Field is not empty.


Fields add structured data to your cards. Instead of writing free-form text, you'll add content to your cards through fields. For example a template might have two fields: Question and Answer. Another example might have three fields: French word, English word, Example sentence. The fields you use depend on the material you're studying.

Primary field

Within a template, there is one field that is designated as the "primary field." This field will be used to represent the card in various parts of the UI (e.g. when referencing it in markdown).

Fields also support all of the same markdown that you can use in a non-templated card (including attachments).

Example templates

The following template will display the contents of the Question Field in an H1 on the first side, and the contents of the Answer field on the second side.

# << Question >>
<< Answer >>

The following template will display the contents of the French word field in an H2 tag on the front side, and the contents of the English word field, followed by the contents of Example sentence in a block quote element.

## << French word >>
<< English word >>

> << Example sentence >>

Dynamic fields

There are several types of fields at your disposal in Mochi. The basic fields like Text will just display whatever you put in them in the template. There are a whole other set of field types called "Dynamic fields" which will transform the input text into some thing else. For example the Translate dynamic field type will translate the input text from one language to another. You can then add these fields to your template like you would any other field.

You can even change the source of a dynamic field from a text input, to the value from another field. This lets you generate a variety of content from a single input.

The following is a list of available Dynamic fields and how they transform the input text.

  • Draw - Does not accept any input. Embeds a drawable canvas on the card.
  • Text to speech - Creates a text to speech audio clip from the input text and embeds it into the card.
  • Image search - Performs an image search with the input text and embeds the result into the card.
  • Translation - Translates the input text from one language to another. (Note: the translated output can be used as the input for another dynamic field)
  • Dictionary - Looks up the definition of the input text in the specified dictionary, then displays it in the card.
  • Chinese Pinyin - Adds pinyin pronunciation ruby characters to Chinese text.
  • Japanese furigana - Adds Japanese furigana pronunciation ruby characters to Japanese text.

Custom components

Under the hood, dyanmic fields are implemented using custom components. There isn't much of a reason to use custom components on their own, but this documentation is here for backwards compatability and for posterity.

Custom components are custom HTML tags that transform text and display it on a card. Here is an example of a custom component:

<speech lang="en">Hello, world!</speech>

The component will operate on whatever text is inside the opening and closing tag. Some components also come with attributes that you can use to tweak the results.

Custom components become very useful when used in conjunction with fields within a template. Using custom components you can automatically generate content for a card from a single field, such as a field representing a vocab word.


## << Vocab >>
<furigana> << Vocab >> </furigana>

<translate from="ja" to="en"> << Vocab >> </translate>

<speech lang="ja"> << Vocab >> </speech>

You can access a list of components by typing / when editing a template.


Creates a drawable canvas on the card. The size of the canvas can be set using the width and height properties. Accepts the following attributes:

  • brushRadius - Integer - The size of the brush.
  • brushColor - CSS <color> - The color of the brush.
  • width - CSS <length> - The width of the canvas.
  • height - CSS <length> - The height of the canvas.


<draw height="200px" brushColor="#FF0000" brushRadius="4"/>


The value for the lang attribute should be a two-character language code. Some languages are available in more than one country. For example english can be U.S. (en-US), British, (en-GB), Austrailian (en-AU), etc. For the full list of available languages, see:

The <speech> component also accepts an optional gender attribute which can be male or female.

Instead of providing a lang and gender attribute, you can specify a voice attribute taken directly from the list of voices.

<speech voice="vi-VN-Wavenet-C">xin chào</speech>


<speech lang="ja" gender="female">Phrase to speak</speech>


This component will add phonetic hiragana above above Japanese kanji. The text can contain a mixture of kanji, hiragan, and katakana, but should have at least one kanji character to function properly.




This component displays Pinyin romanization above chinese characters, including tone denoting diacritic marks.




The from and to attributes should contain a two character language code.


<translate from="en" to="es">Text to translate</translate>


Uses image search to search for an image using the enclosed text. The moderate attribute may be omitted, and if it is will default to true.


<image moderate="true">Dog</image>


Uses a dictionary to look up the term enclosed. The from attribute should be a two character language code representing the word to look up, while the to attribute should be the language to use for the definition (if different from the target language). A list of available dictionaries is listed below.

  • ar Arabic

    • to en English
  • en English

    • to ar Arabic
    • to fr French
    • to de German
    • to en English
    • to es Spanish
    • to ja Japanese
    • to ko Korean
    • to pt Portuguese
    • to ru Russian
    • to zh_s Chinese (Simplified)
    • to zh_t Chinese (Traditional)
  • fr French

    • to en English
  • de German

    • to en English
  • el Greek

    • to en English
  • he Hebrew

    • to en English
  • it Italian

    • to en English
  • ja Japanese

    • to nl Dutch
    • to en English
    • to fr French
    • to de German
    • to hu Hungarian
    • to ru Russian
  • ko Korean

    • to en English
  • la Latin

    • to en English
  • pt Portuguese

    • to en English
  • ru Russian

    • to en English
  • zh_s Chinese (Simplified)

    • to zh_s Chinese (Simplified)
    • to en English
  • zh_t Chinese (Traditional)

    • to zh_t Chinese (Traditional)
    • to en English
  • es Spanish

    • to en English
  • th Thai

    • to en English


<dictionary from="es" to="en">rojo</dictionary>


Mochi support most standard markdown features in addition to some special extensions like $\LaTeX$, {振}(ふ)り{仮}(が){名}(な), ==highlighted text==, and {{cloze deletions}}. You can take a look at this guide for more help on makdown generally, or click the keyboard icon (desktop only) on the bottom right for more hints.

Adding Sides

Like traditional flash cards, Mochi cards can have one or two sides. You can separate "sides" in a card by adding three dashes on its own line: --- The content above the line will be the first side, and the content below will be on the second side. When reviewing cards, only the first side will be shown, and you can press the space bar to reveal the next side. But why stop at two sides? With Mochi you can add as many "sides" as you want, and they will be revealed one at a time.

Cloze deletions

Cloze deletions are a way of hiding information within a card when it's being reviewed.

Simple deletions

Mochi supports simple cloze deletions with the following markdown syntax:

The Shiba Inu is a breed of {{hunting dog}} from {{Japan}}.

Where both "hunting dog" and "Japan" will be hidden when the card is reviewed.

Cloze deletion groups

You can also prefix an index number to your cloze deletions to create separate cloze groups for your card, one for each index, where only one cloze group will be hidden at a time. For example:

The {{1::Shiba Inu}} is a breed of {{2::hunting dog}} from {{2::Japan}}.

In this example, you will be shown two different versions of the card, one where "Shiba Inu" is hidden, and one where "hunting dog" and "Japan" are hidden. These two versions will have their own review shedule and history.


You can make references to other cards or decks using MediaWiki syntax:

[[My card|the-card-id]] or just [[the-car-id]]

The text before the pipe | character will be displayed as the title of the link, and the text after the pipe is the card or deck ID. If no title is provided then the title of the card will be pulled dynamically based on the contents of the card.

You can open the referenced card in editing mode by holding command on Mac or control on Windows/Linux and clicking the reference text.

Cards that link to another card will be back referenced by the card that was linked to. You can see an example of this in the [[Kanji|FSMl7EpIZbagcIF]] deck, where each kanji card will show a list of vocab words that link to it.

You can also embed one card inside of another using this variation:



Media can be attached by dragging and dropping a file onto the editing area, or pasting an image that's been copied to the clipboard. The media will be stored locally and displayed using standard markdown syntax.

![Some Image](@media/image-name.jpg)

The above syntax will work for audio and video files as well. If the card is deleted, the associate media will be deleted as well.


If markdown isn't enough, you can also add HTML to your cards. For example, to change the color of a word you can write: <span style="color:red">foo</span> which will look like this: foo.

Spaced repetition

Spaced repetition is a very powerful flash card scheduling system. It exploits something called forgetting curve, which describes the fact that it takes longer to forget something if you are reminded of it right before you forget it.

Mochi's spaced repetition algorithm is very simple. Each time you remember a card, the time it takes before it's reviewed again doubles. When a card is forgotten that time is cut in half. These settings can be tweaked in the settings, and different decks can have their own settings.

Learning new cards

New cards are not immediately placed in the review schedule. That is what the New cards section is for. This is useful in case you want to add a lot of cards up front, or are importing a deck form somewhere else and want to gradually add cards to your review schedule.

You can learn all new cards in your collection by clicking "New cards" in the left side bar. Or you can learn new cards for a single deck by clicking the "New cards" button at the top of the deck page.

You can limit the number of new cards that will be shown each day in the review settings. The setting can be adjusted for the entire app, or for individual decks.

Tip: If you want to use a deck as a notebook, you can limit the new cards to 0, or archive it.

Reviewing cards

When a card is due, it will show up in the "Due today" screen. The cards will be presented in random order, and cards that are past due (due yesterday or earlier) will be shown first. If you miss a card, you'll have an opportunity to re-review it at the end.

Reverse reviews

Normally when reviewing a card, the first side is revealed, followed by the second side (and so on if there are more than two sides). When the "reverse reviews" option is enabled, the card will also be shown with the last side revealed, followed by the side before it, and so on.

This allows you to, for example, test recognition and recognition with a single card. There will be two separate review histories for each direction.

Reverse reviews can be enabled globally, per deck, or per card.


In addition to the other two modes, you can also review your cards outside of the spaced repetition schedule. The "Cram" button allows you to review all of the cards in your deck regardless of whether they're due. Reviews. in this mode will not affect the standard spaced repetition scheduling.

Additionally, if any filters or search terms are applied to the deck, the Cram mode will only show cards from the filter / search results. For example, you can filter for cards that have a retention rate less than 80%, and do a cram on just those cards.


Cards and decks can both be "archived." When a card is archived, it will not show up in the "New cards" section, or in the "Due today" section. Its review history will remain unchanged.

To view all of the archived cards in a deck, you can apply a filter for archived cards in the corresponding deck page.

When a deck is archived, all of the cards in that deck will effectively be archived.

Import and export

Mochi supports various import and export options to maximize portability of data, and allow users to easily share decks with each other.

.mochi format

Decks can be exported as .mochi files. This format will export all cards within a particular deck as well as various metadata such as review history, card order, etc.

Anki .apkg format

Mochi supports importing Anki .apkg files. Because of the differences between Mochi and Anki, however, Anki cards will not necessarily import exactly as they appear in Anki. For best results, consider editing the templates of your Anki decks to remove extraneous HTML and remove all CSS and Javascript before exporting. When imported into Mochi, the CSS and Javascript will be removed, and the HTML will be converted to markdown, so the cards should work in Anki without any CSS or Javascript.

Markdown format

You can also choose to export your decks as a collection of markdown files. At the moment this export format does not preserve metadata like review history, card order, etc.

You can also import individual markdown files and each file will be imported as its own Mochi card.

CSV format

When importing using a CSV file, each row will be imported as a card.

When importing into a deck with a template, then each column will be interpreted as a field on the template. The header value of the column will determine which field in the template it corresponds to. You can either use the field name, or it's ID as the header value.

When importing into a deck without a template, each column will be interpreted as a separate side on the card.

Keyboard shortcuts

Mochi is designed to get out of your way so that you can learn as quickly and easily as possible. To that end almost every action on every screen has keyboard shortcuts. For example d will delete a note or card, space will reveal the next side of a card, e will edit a note or card, etc.

You can press ? at any time, or click the keyboard icon in the bottom right to see a list of keyboard shortcuts for the current screen.