How To Import Decks Into Anki: Complete Step-by-Step Configuration Guide
To import decks into Anki, open the desktop application, click the Import File button at the bottom of the main dashboard, or select File and then Import from the top menu. Select your compatible flashcard file, map your database fields to the correct Note Type, and confirm the import to integrate the cards into your database. Ensure all text-based files use UTF-8 encoding and that any associated media files are placed directly inside your collection media directory.
Preparing Your System and Flashcard Files for Anki
Importing flashcard databases into Anki requires an understanding of file compatibility, database architecture, and system paths. Before executing an import, you must identify the source file format and ensure your local environment is configured to parse the incoming data without corruption.
Anki operates on a relational database structure where individual cards are generated from underlying data records known as Notes. Importing files incorrectly can cause missing media elements, broken HTML formatting, mismatched fields, or synchronization conflicts across your devices. Use the following hardware and file preparation checklist to ensure a successful data transfer.
Pre-Import Configuration Checklist
- Supported Desktop Client: Install the latest stable version of Anki Desktop for Windows, macOS, or Linux. While mobile applications like AnkiMobile (iOS) and AnkiDroid (Android) support basic cloud syncing, complex importing, file mapping, and custom note-type configurations should be performed on a desktop computer.
- Target File Formats: Ensure your deck file is saved in an approved format. Native package files use the .apkg extension, while whole collection archives use .colpkg. Delimited text databases must use the .csv, .txt, or .tsv extensions.
- Encoding Standards: Text files must be saved with UTF-8 character encoding. Using UTF-16, ANSI, or region-specific Windows encoding will result in unreadable characters, broken accents, and corrupted non-English scripts.
- Storage Requirements: Ensure your local storage drive has at least twice the storage space of the file you are importing. High-resolution medical, language, or science decks containing audio and image assets require extra space during the extraction and integration phases.
- Estimated Process Duration: Complete native package imports (.apkg) usually take less than 60 seconds. Custom delimited text file imports (.csv) with mapping configurations typically require 5 to 10 minutes of preparation and testing.
Step-by-Step Execution of Anki Deck Imports
The specific process for importing files into Anki depends entirely on whether you are working with a pre-packaged native file or raw spreadsheet data. Follow the appropriate sub-sections below to execute your import.
Step 1: Preparing and Formatting Your Import Files
Before initiating the import process inside Anki, you must prepare the source file to match Anki's database expectations.
If you are using a native deck downloaded from AnkiWeb or shared by a colleague, it will end in the .apkg extension. No additional file preparation is necessary; you can proceed directly to Step 2.
If you are importing custom data from spreadsheet applications like Microsoft Excel or Google Sheets, you must export the data as a delimited text file. Organize your spreadsheet so that each column represents a specific field on your flashcards, such as Front, Back, Extra Information, or Tags. Save the spreadsheet as a Comma-Separated Values (.csv) or Tab-Separated Values (.tsv) file.
Verify your text file encoding using a plain text editor like Notepad on Windows or TextEdit on macOS. Select File, choose Save As, and confirm that the Encoding dropdown menu is set to UTF-8. Saving in this format prevents special characters, mathematical symbols, and foreign alphabets from converting into unreadable text strings during import.
Step 2: Executing Native Package Imports (.apkg & .colpkg)
Native package files contain not only the flashcard text data but also the corresponding note types, card styling, and media assets. This makes them highly convenient and easy to import.
- Launch the Anki desktop application on your computer.
- Select the specific Profile into which you want to load the new deck.
- Locate the menu bar at the top of the application window. Click on File and select Import from the drop-down menu. Alternatively, you can click the Import File button located at the bottom of the main deck list dashboard.
- A file browser window will appear. Navigate to the directory where your .apkg or .colpkg file is saved, select the file, and click Open.
- Anki will automatically parse the packaged file, extract the media assets into your local system directory, and generate the deck.
- A progress bar will display the extraction status. Once complete, a summary dialogue box will show the number of cards added, notes updated, or templates modified. Click Close to return to your dashboard.
Warning: Importing a .colpkg file will overwrite your entire existing database, including your current scheduling history, custom decks, and media files. Only import a .colpkg file if you intend to replace your entire Anki collection with a backup or clean profile.
Step 3: Importing Delimited Text Files (.csv & .txt)
Importing raw text databases allows you to build massive custom study sets from vocabulary lists, spreadsheets, or third-party databases.
- Open the Anki desktop interface and click File, then Import.
- Select your prepared .csv, .txt, or .tsv file from the file explorer and click Open.
- The Import Options dialog box will open. This window controls how Anki interprets the rows and columns of your spreadsheet.
- Locate the Type option. This dropdown menu lets you choose the Note Type that governs your card design. Select Basic for standard two-sided cards, or select Cloze if your spreadsheet contains fill-in-the-blank style deletions.
- Locate the Deck option at the top right. Click this button to select the specific deck where your new cards will be stored. You can also create a brand-new deck by clicking Add and typing a new name.
Step 4: Configuring Field Mapping and HTML Formatting
Once your basic import parameters are set, you must tell Anki how to map individual columns in your spreadsheet to the corresponding fields of your selected Note Type.
- Under the Field Mapping section of the import window, you will see a list of numbered columns corresponding to the columns in your spreadsheet.
- Next to each column number, use the dropdown menu to match it to a specific field in your Anki note type. For example, set Column 1 to Front, Column 2 to Back, and Column 3 to Tags.
- If your spreadsheet contains columns you do not want to import, change their dropdown setting to Ignore Field.
- Configure the HTML Options. If your spreadsheet contains HTML formatting tags such as bolding, italics, or custom colors, check the box labeled Allow HTML in fields. If your text is plain and does not contain code, leave this unchecked to prevent raw code from displaying on your cards.
- In the Import Action dropdown menu, select how Anki should handle duplicate notes. Choose Update existing notes to overwrite existing cards with new information, or choose Ignore lines where first field matches existing note to prevent duplicate cards from being added to your deck.
- Click the Import button in the bottom right corner to complete the database integration.
Step 5: Synchronizing Media Assets and Verification
If your custom text deck references audio, video, or image files, you must manually place these assets into Anki’s background storage folder so the software can locate and display them.
- Collect all the media assets referenced in your text spreadsheet. Ensure the filenames in your spreadsheet match the physical filenames exactly, including the file extensions (for example, image.jpg or pronunciation.mp3).
- Locate your Anki user profile folder on your local computer. On Windows, open the Run prompt by pressing Windows Key + R, type
%APPDATA%\Anki2and press Enter. On macOS, open Finder, hold down the Option key, click Go in the top menu bar, select Library, and navigate to Application Support/Anki2. - Open the folder named after your specific Anki Profile, and then open the subfolder named collection.media.
- Drag and drop all your media files directly into this collection.media folder. Do not place them in subfolders or create a nested file structure, as Anki cannot scan subdirectories.
- Once your media files are in place, return to the Anki desktop application. Click on Tools in the top menu bar and select Check Media. Anki will scan your cards and verify that all referenced files are present.
- After confirming that your cards display correctly, click the Sync button in the upper right corner of the dashboard to upload your new deck and its media assets to AnkiWeb. This step ensures the cards become available on your mobile devices.
Pro-Tip: If you see broken image icons or hear no audio when reviewing your newly imported cards, check that the filenames in your spreadsheet exactly match the actual filenames in your collection.media folder. Remember that filenames are case-sensitive on macOS, Linux, iOS, and Android systems.
Importing a premade deck to my anki app - Syncing & AnkiWeb - Anki Forums
Technical Specifications of Anki-Compatible File Layouts
Selecting the correct file structure before starting your import prevents formatting errors and database corruption. The table below outlines the primary parameters and requirements for each file format supported by Anki.
| File Extension | Primary Use Case | Media Support | Processing Complexity | Import Mechanism |
|---|---|---|---|---|
| .apkg | Sharing pre-made decks containing complete styling and schedule histories. | Embedded within package; extracts automatically. | Low (No user mapping or text editing required). | Automatic native extraction via File > Import. |
| .colpkg | Restoring an entire profile from a backup, including all user options and statistics. | Embedded within package; replaces entire profile. | High (Overwrites all active local profiles). | Full system rewrite via File > Import. |
| .csv | Importing structural text databases from Excel, Google Sheets, or web scrapers. | HTML tags reference files in collection.media. | Medium (Requires manual column and field mapping). | Manual mapping configurations in Import Options. |
| .tsv | Importing tab-delimited records with columns that contain standard comma punctuation. | HTML tags reference files in collection.media. | Medium (Avoids issues with commas in standard text fields). | Manual mapping configurations in Import Options. |
| .txt | Importing simple text lists or basic phrase translations. | Plain text only; no native media support. | Low (Minimal database requirements). | Simple field allocation via File > Import. |
Troubleshooting Critical Anki Import and Formatting Failures
Even with proper preparation, you may occasionally run into issues when importing data into Anki. Below are the most common technical errors and their solutions.
Issue 1: Foreign Characters and Symbols Displaying as Question Marks or Corrupted Text
- Root Cause: The imported text file was saved with a legacy text encoding standard, such as ANSI or Windows-1252, which cannot represent special characters, accents, or non-Latin alphabets correctly.
- Actionable Fix: Open the source text file in an advanced plain text editor, such as VS Code, Notepad++, or Sublime Text. Click File, select Save with Encoding or Export As, and choose UTF-8. Save the file under a new name and import this new version into Anki.
Issue 2: Flashcards Display Raw HTML Code Instead of Rendered Formatting
- Root Cause: The option to allow HTML was not checked during the text file import process. This causes Anki to treat HTML tags as plain text, rendering them literally on your cards.
- Actionable Fix: Delete the corrupted deck from your dashboard. Re-initiate the import process using your text file. In the Import Options dialog box, check the box labeled Allow HTML in fields before clicking import.
Issue 3: Media Files Fail to Load, Displaying a Broken Image Icon Instead
- Root Cause: The media files are either missing from the local collection.media directory, or the filenames written in your source spreadsheet do not match the actual media filenames exactly.
- Actionable Fix: Ensure that all associated media files are placed directly inside your local collection.media directory. Check your spreadsheet text to make sure the media filenames match the physical files exactly, paying close attention to uppercase letters, lowercase letters, and file extensions like .png vs .jpg. Run Tools and then Check Media to identify which filenames are missing.
Issue 4: Card Rows are Combined, Merged, or Split Into Incorrect Columns
- Root Cause: Your delimiter character, such as a comma, was used inside a text field on your spreadsheet without being enclosed in quotation marks. This causes Anki to split your text across multiple fields incorrectly.
- Actionable Fix: When exporting text databases from Excel or Google Sheets, choose Tab-Separated Values (.tsv) instead of Comma-Separated Values. Tabs are much less common in everyday text fields, making them highly reliable delimiters that prevent accidental column splitting.
Frequently Asked Questions
Can I import flashcards directly from an Excel spreadsheet into Anki?
No, you cannot import native Excel files with .xls or .xlsx extensions directly into Anki. You must first open your spreadsheet in Microsoft Excel, select Save As, and choose CSV (Comma Delimited) (*.csv) or Tab Delimited (*.txt) as your export format. Once saved as a delimited text file, you can easily import it using Anki’s standard import workflow.
How do I import a deck into my AnkiMobile (iOS) or AnkiDroid (Android) application?
The easiest way to import decks on a mobile device is to first import them into your desktop Anki application, and then click Sync to upload them to your free AnkiWeb cloud account. Open your mobile app and tap the sync button to download the newly imported deck. If you need to import a file directly on your mobile device, you can transfer the .apkg file to your phone's local storage and open it using your mobile device's built-in file manager to trigger the automatic import process inside Anki.
Will importing a new deck overwrite or delete my existing study history and progress?
Importing a standard package file with the .apkg extension will not overwrite your existing database or delete your current study history. It simply merges the new cards into your existing collection. However, importing a whole collection backup file with the .colpkg extension will completely replace your current database, overwriting your active profiles, decks, schedules, and styling configurations.
What should I do if my import contains duplicate cards?
You can control how Anki handles duplicate cards in the Import Options window when importing text files. In the Import Action dropdown menu, you can select Ignore lines where first field matches existing note to prevent duplicates from being added. If you have already imported duplicate cards, you can find and remove them by opening the Browse window, clicking Card in the top menu, selecting Select Duplicates, and deleting the unnecessary copies.
Enhance Your Active Recall Study Workflow
Now that your custom flashcards and media assets are successfully imported, you can maximize your retention by diving into Anki's advanced database options. Read our comprehensive guide on configuring custom scheduling algorithms, building custom card designs, and managing active recall intervals to take your learning to the next level.