Koha Library Tool
Excel / CSV to MARC Converter
Convert spreadsheet records into MARCEdit .mrk, binary MARC .mrc ISO 2709, and optional MARCXML for Koha and other MARC21 library systems.
1. Upload Excel or CSV
First row must contain column headers. Supported files: .xlsx, .xls, .csv.
2. Koha validation settings
Optional but recommended. Add your actual Koha codes to warn users before import. Codes are case sensitive.
BK instead of Book if BK is your Koha item type code.
3. Column mapping
Map each spreadsheet column to a MARC21 or Koha field. Use Skip for columns you do not want to export.
4. .MRK preview
Preview shows the first generated records in MARCEdit mnemonic format.
No MARC output yet.
5. Validation report
Supported MARC / Koha fields
Koha Excel / CSV to MARC Converter User Guide
Use this guide to prepare spreadsheet records, map columns to MARC21 and Koha fields, generate .mrk, .mrc, and MARCXML files, and import the final MARC file into Koha safely.
1. What this tool does
The Koha Excel / CSV to MARC Converter changes spreadsheet data into library catalog records. It is designed for librarians, catalogers, library assistants, and data migration teams who need to convert book, thesis, report, or other bibliographic records into MARC21 format for Koha.
The tool works in your browser. You upload an Excel or CSV file, select the worksheet, map each column to a MARC field, check the validation report, preview the records in .mrk format, and download the final files.
2. Before you upload your spreadsheet
A clean spreadsheet gives better MARC records. Each row should represent one bibliographic record. The first row must contain clear column headers such as Title, Author, ISBN, Publisher, Year, Barcode, Home Library, Holding Library, Item Type, and Call Number.
Recommended spreadsheet rules
- Use one record per row.
- Use the first row for column names only.
- Do not merge cells.
- Do not place notes, headings, or totals inside the data rows.
- Use Koha codes, not long descriptions, for branch codes and item type codes.
- Use the date format YYYY-MM-DD for Date Acquired.
- Keep barcode values unique.
- Use the multi value separator when one cell contains more than one subject, author, or note.
Best starting columns
| Spreadsheet column | Recommended mapping | Purpose |
|---|---|---|
| Control Number | 001 | Unique control number for the record. |
| ISBN | 020$a | International Standard Book Number. |
| Title | 245$a | Main title of the item. |
| Subtitle | 245$b | Subtitle or remainder of title. |
| Author | 100$a | Main personal author. |
| Publisher | 264$b or 260$b | Publisher name. |
| Publication Year | 264$c or 260$c | Publication date or year. |
| Pages | 300$a | Physical description, such as 250 pages. |
| Subject | 650$a | Topical subject heading. |
| Home Library | 952$a | Koha home branch code for the item. |
| Holding Library | 952$b | Koha current or holding branch code. |
| Barcode | 952$p | Item barcode used for circulation. |
| Item Type | 942$c and 952$y | Koha item type at record and item level. |
| Call Number | 952$o | Full item call number. |
| Date Acquired | 952$d | Date the item was acquired. |
3. Understanding the main Koha fields
Koha uses regular MARC21 fields for bibliographic description and local 9XX fields for Koha specific data. The most important Koha fields in this tool are 942 and 952.
942 fields
The 942 field stores Koha record level information. The most important subfield is 942$c, which stores the record level item type. Your value should match an item type code already created in Koha, such as BK, REF, DVD, or your own library code.
952 fields
The 952 field stores Koha item information. If you are importing physical items into Koha, this field is very important. Common item fields include:
| Field | Meaning | Recommended use |
|---|---|---|
| 952$a | Home library | Use the Koha branch code. |
| 952$b | Current or holding library | Usually same as home library unless the item is held elsewhere. |
| 952$c | Shelving location | Use your Koha location code if locations are configured. |
| 952$d | Date acquired | Use YYYY-MM-DD. |
| 952$i | Inventory number | Use for accession or inventory tracking if your Koha setup uses it. |
| 952$o | Full call number | Use for classification plus cutter or local call number. |
| 952$p | Barcode | Use a unique barcode for circulation. |
| 952$y | Item type | Use the Koha item type code. |
4. Step by step instructions
Step 1: Upload Excel or CSV
Click Select file and choose your spreadsheet. The tool supports .xlsx, .xls, and .csv files. After upload, it reads the first row as column headers and creates the mapping form.
Step 2: Choose the worksheet
If your Excel workbook has more than one sheet, choose the correct worksheet from the Worksheet dropdown. Make sure the selected sheet contains the catalog records you want to convert.
Step 3: Set the multi value separator
The default separator is the vertical bar character |. Use it when one spreadsheet cell contains multiple values. For example, one Subject cell can contain:
When mapped to 650$a, the tool can create repeated subject fields from that cell.
Step 4: Check the default leader
The default leader is 00000nam a2200000 a 4500. It is suitable as a basic starting point for many book records. Advanced catalogers may adjust the leader according to record type and bibliographic level.
Step 5: Add default 003 if needed
The 003 field identifies the organization responsible for the control number in 001. If your library has an assigned control number identifier or local code, enter it in the Default 003 field. Leave it blank if you do not use 003.
Step 6: Keep auto 005 enabled
The 005 field stores the date and time of the latest transaction. Keeping Auto add missing 005 date/time field enabled helps create a more complete MARC record when your spreadsheet does not already include 005.
Step 7: Add Koha validation settings
Enter your real Koha codes in the validation settings. This helps catch wrong branch codes, wrong item type codes, and wrong shelving location codes before you import the file.
Use actual Koha codes, not public names. For example, if Koha item type code is BK and the description is Book, enter BK.
Step 8: Map spreadsheet columns
Use the dropdown beside each column header to choose the correct MARC field. Choose Skip for any column that should not appear in the output.
You can click Auto map columns to let the tool guess mappings from common header names. Always review the result before generating files.
Step 9: Generate MARC
Click Generate MARC. The tool creates a preview in .mrk format and displays a validation report. Review warnings carefully. Warnings do not always mean the record is unusable, but they show items that should be checked before import.
Step 10: Download the files
After generation, download the file type you need:
- Download .MRK for review, editing, or sharing with MarcEdit users.
- Download .MRC for the main Koha import workflow.
- Download MARCXML if your workflow requires XML.
- Download report to keep a record of validation warnings.
5. Example mapping
The following example shows how a simple spreadsheet row becomes a MARC record preview.
Example spreadsheet row
| Title | Author | ISBN | Publisher | Year | Barcode | Item Type |
|---|---|---|---|---|---|---|
| Introduction to Library Science | Ali Khan | 9780000000001 | Sample Publisher | 2026 | B0001 | BK |
Example .mrk preview
6. Validation report explained
The validation report helps identify problems before import. It checks common issues that affect Koha item imports and MARC record quality.
| Warning or error | What it means | How to fix it |
|---|---|---|
| Leader must be exactly 24 characters | The MARC leader is not the correct length. | Use the default leader or enter a valid 24 character leader. |
| 008 is missing | The fixed length data field is not present. | Add an 008 column if your cataloging policy requires it. |
| 942$c is missing | Koha record level item type is missing. | Map an item type column to 942$c. |
| 952$a is missing | Home library is missing for item import. | Map your home branch column to 952$a. |
| 952$b is missing | Holding library is missing for item import. | Map your holding branch column to 952$b. |
| 952$p is missing | Barcode is missing. | Map barcode to 952$p if the item will circulate. |
| 952$y is missing | Item type is missing at item level. | Map item type to 952$y. |
| Code not in allowed list | The value does not match your validation list. | Correct the spreadsheet value or update the allowed codes list. |
| Duplicate barcode | The same barcode appears in more than one row. | Make every barcode unique before importing. |
| Date should be YYYY-MM-DD | Date Acquired is not in the expected format. | Use a date like 2026-04-24. |
7. Importing the .mrc file into Koha
After downloading the .mrc file, import it through Koha’s MARC staging workflow. Menu names may vary slightly by Koha version and staff interface customization.
- Log in to the Koha staff interface.
- Go to More, then Cataloging, then Import, then Stage records for import.
- Select the .mrc file downloaded from the converter.
- Choose the correct record type, matching rule, and item processing options according to your library policy.
- Stage the records.
- Review the staged records and check for errors or unexpected matches.
- Use the manage staged records screen to complete the import into the catalog.
- Check a few imported records in the catalog and confirm that bibliographic fields and item fields imported correctly.
8. Recommended testing checklist
- Open the .mrk preview and confirm the title appears in 245$a.
- Confirm author names are mapped to 100$a or 700$a as needed.
- Confirm subjects are mapped to 650$a.
- Confirm 942$c contains a valid Koha item type code.
- Confirm 952$a and 952$b contain valid Koha branch codes.
- Confirm 952$p barcodes are unique.
- Confirm 952$y contains a valid Koha item type code.
- Confirm 952$o is the full call number.
- Confirm date acquired uses YYYY-MM-DD.
- Import a small test batch into Koha before importing the full file.
9. Troubleshooting
The tool does not read my file
Check that your file is saved as .xlsx, .xls, or .csv. If the file came from another system, open it in Excel, Google Sheets, or LibreOffice, then save a fresh copy.
My worksheet is blank
Make sure you selected the correct worksheet. Also check that your first row contains headers and that records start below the header row.
Auto map selected the wrong field
Auto map is only a helper. Review every dropdown and manually correct any wrong mapping before generating the output.
Subjects are not repeating correctly
Check the multi value separator. If the separator is |, write multiple subjects as Cataloging|Metadata|Libraries inside one cell.
Koha does not accept my item type
Use the item type code from Koha administration, not the public description. For example, use BK if that is the configured code for books.
My records imported but items did not appear
Check 952 fields. At minimum, review 952$a, 952$b, 952$p, and 952$y. Also check your Koha staging options to confirm item fields were imported.
The .mrk file will not import into Koha
Use .mrc for Koha import. The .mrk file is for preview and MarcEdit style editing. It is not the same as binary MARC.
10. Frequently asked questions
Can I use CSV instead of Excel?
Yes. The tool supports CSV as well as Excel files. CSV is useful when exporting records from older systems or databases.
Which file should I import into Koha?
Use the .mrc file for the normal MARC import workflow. Use MARCXML only if your Koha workflow specifically requires XML.
Why does the tool create .mrk?
The .mrk format is easier to read. It helps you review records before import and makes cataloging errors easier to spot.
Can I import records without item fields?
Yes, bibliographic records can exist without items. However, if you want holdings and circulation items to appear in Koha, you should include 952 item fields.
Should I use 260 or 264?
Many modern MARC21 workflows prefer 264 for production, publication, distribution, manufacture, and copyright information. Some older records still use 260. Follow your local cataloging policy.
Can I use local fields?
This version focuses on common MARC21 and Koha fields. If your library uses additional local fields, the tool can be extended to include them.
Does the tool change data inside Koha?
No. The tool only creates downloadable files in your browser. Koha is changed only after you upload and import the generated file through the Koha staff interface.
Is my spreadsheet uploaded to a server?
The tool is designed to run in the browser. Your file is processed locally by the page script, not by a custom server connected to this guide.
Reference notes
For official cataloging and import behavior, always follow your own Koha version, local cataloging policy, and system administrator guidance. Useful references include the Koha Community manual, the Library of Congress MARC21 record structure documentation, and MarcEdit documentation for .mrk workflows.