How to Import Invoices into Xero: Complete CSV Guide

Step-by-step guide to importing invoices into Xero via CSV. Covers sales invoices, purchase bills, CSV fields, platform migration, and common import errors.

Published
Updated
Reading Time
23 min
Topics:
Software IntegrationsXeroInvoice ImportCSV ImportPlatform Migration

To import invoices into Xero, format a CSV file with ContactName, InvoiceNumber, InvoiceDate, DueDate, and Total columns. Go to Business > Invoices > Import, upload the file, and map your fields. Xero accepts CSV imports for both sales invoices and purchase bills.

This guide walks through every step of the Xero invoice import process:

  • Four import methods compared: native CSV upload, Conversion Toolbox, Hubdoc, and third-party extraction tools, so you can pick the right one for your workflow
  • CSV template field requirements for both sales invoices and purchase bills, with every required and optional column explained
  • Step-by-step import procedures for each invoice type
  • Migration paths from QuickBooks, Sage, and FreshBooks into Xero
  • Converting PDF invoices into Xero-ready CSV files, solving the upstream formatting problem most guides skip
  • Common import errors and fixes, from date format mismatches to duplicate invoice numbers

The right approach depends on your situation, whether you are migrating historical data from another platform, processing a backlog of PDF invoices, or setting up an ongoing import workflow.


Four Methods for Importing Invoices into Xero

Before you start formatting spreadsheets, it is worth understanding all the routes available for getting invoice data into Xero. Each method serves a different scenario, and picking the wrong one can mean unnecessary rework.

MethodBest ForInvoice TypesFormat
Native CSV ImportBatch importing historical or ongoing invoicesSales invoices and purchase billsCSV file
Conversion ToolboxFull accounting system migrationsSales invoices, purchase bills, contacts, chart of accountsXero migration format
HubdocOngoing capture of received invoices and billsSales invoices and purchase billsPDF, email, photo
Third-party extraction toolsConverting PDF or paper invoices into structured CSV files for importSales invoices and purchase billsCSV/Excel output

Native CSV Import gives you direct control over field mapping and is the most flexible method for batch imports, migrations, and recurring workflows. Conversion Toolbox handles full platform migrations (invoices, contacts, chart of accounts) in one guided step. Hubdoc, included with most Xero subscriptions, captures invoices from PDFs, emails, and photos on an ongoing basis. Third-party extraction tools convert PDF and scanned invoices into Xero-compatible CSV files when your source documents are unstructured.

That last point matters more than you might expect. Xero's Accounting and Bookkeeping Industry Report found that only 49% of small businesses use accounting software, just 59% of bookkeeping services are cloud-based, and only 40% of clients benefit from connected bank feeds. Many businesses are still transitioning to cloud accounting, which makes data import a common and critical task rather than a one-off event.

For practitioners managing multiple clients, understanding all four methods is essential. One client may need a full QuickBooks migration via Conversion Toolbox, another may send boxes of paper invoices requiring third-party extraction, and a third may just need a clean CSV upload of last quarter's sales invoices. Familiarity with invoice processing for accounting professionals across these different scenarios means you can match the right tool to each client's situation without delays.

A few important limitations to note: Xero's CSV import does not support credit notes, repeating invoices, or direct Excel file uploads (you must save as .csv first). It also does not import payment records, so any invoices imported as "paid" still need manual payment allocation in Xero after the fact.


Xero CSV Invoice Template: Required and Optional Fields

Xero uses separate CSV templates for sales invoices and purchase bills. The column names, required fields, and expected values differ between the two, so using the wrong template will cause your import to fail. Here is a field-by-field breakdown of both.

Sales Invoice CSV Fields

Field NameRequired/OptionalNotes
ContactNameRequiredMust match an existing Xero contact exactly. If no match is found, Xero creates a new contact automatically.
EmailAddressOptionalContact email address. Useful if you plan to send invoices directly from Xero after import.
InvoiceNumberRequiredUnique identifier for each invoice. Xero rejects any row with a duplicate invoice number already in the system.
ReferenceOptionalPO number or external reference for cross-referencing with other systems.
InvoiceDateRequiredFormat must match your Xero organization date settings: DD/MM/YYYY for UK, AU, and NZ organizations; MM/DD/YYYY for US organizations.
DueDateRequiredMust be on or after the InvoiceDate. Xero will reject rows where the due date precedes the invoice date.
DescriptionRequiredLine item description. Each line item on an invoice gets its own row in the CSV.
QuantityRequired for line itemsNumber of units. Defaults to 1 if left blank.
UnitAmountRequired for line itemsPrice per unit excluding tax. Use decimal points only, no currency symbols.
AccountCodeRequiredMust exactly match an existing account code in your Xero chart of accounts (e.g., 200 for Sales).
TaxTypeRequiredMust exactly match a tax rate name configured in Xero. For example, "20% (VAT on Income)" for UK sales or "Tax on Sales" for US organizations.
DiscountOptionalPercentage discount applied to the line item. Enter as a number (e.g., 10 for 10%).
CurrencyOptionalThree-letter ISO currency code (e.g., USD, GBP, EUR). Only needed for multi-currency invoices.

Purchase Bill CSV Fields

Xero's purchase bill CSV template shares a similar structure but uses different field names and mappings in several places.

Field NameRequired/OptionalNotes
ContactNameRequiredRefers to the supplier name. Must match an existing contact in Xero or a new contact is created.
InvoiceNumberRequiredThe supplier's invoice number. Must be unique per supplier within Xero.
ReferenceOptionalYour internal PO number or reference for the purchase.
InvoiceDateRequiredDate on the supplier's invoice. Same date format rules apply as sales invoices.
DueDateRequiredPayment due date. Must be on or after InvoiceDate.
DescriptionRequiredLine item description for the purchased goods or services.
QuantityRequired for line itemsDefaults to 1 if omitted.
UnitAmountRequired for line itemsCost per unit excluding tax. Decimal points only, no currency symbols.
AccountCodeRequiredMaps to expense or asset accounts in your chart of accounts (e.g., 400 for Advertising, 710 for Office Equipment) rather than revenue accounts.
TaxTypeRequiredMaps to purchase tax rates rather than sales tax rates. For example, "20% (VAT on Expenses)" for UK or "Tax on Purchases" for US.
InventoryItemCodeOptionalReferences an inventory item for stock tracking. Must match an existing item code in Xero's inventory.
DiscountOptionalPercentage discount on the line item.
CurrencyOptionalThree-letter ISO code, required only for multi-currency bills.

Note that there is no EmailAddress field for purchase bills, and the InventoryItemCode field is available for bills but not for sales invoices.

Critical Data Formatting Rules

Date format must match your organization's Xero settings. Check this under Settings > General Settings > Date Format. A DD/MM/YYYY date imported into a US-format organization will either fail or be misinterpreted.

Amounts use decimal points as the decimal separator, not commas. Do not include currency symbols ($, £, €). Enter 1250.50, not $1,250.50.

Multi-line invoices are handled by repeating the same InvoiceNumber across multiple rows. Each row represents one line item. Xero groups all rows sharing the same InvoiceNumber into a single invoice or bill. The header fields (ContactName, InvoiceDate, DueDate) should be identical across all rows for that invoice.

AccountCode and TaxType values must be exact matches to what exists in your Xero organization. A code of "201" when your chart of accounts uses "200" will cause that row to fail. Similarly, a TaxType of "VAT 20%" will be rejected if Xero expects "20% (VAT on Income)". Copy these values directly from your Xero settings to avoid mismatches.

Xero provides downloadable CSV templates directly from the import screen. Starting from these templates is the safest way to ensure your file structure and column headers are correct before you populate your data.


How to Import Sales Invoices into Xero

Before starting, confirm that your CSV file follows Xero's sales invoice template requirements. Column headers must match Xero's expected field names exactly, AccountCode values must correspond to accounts in your chart of accounts, TaxType entries must use Xero's recognized tax rate names, and dates must be formatted consistently (DD/MM/YYYY or MM/DD/YYYY depending on your Xero organization's region settings).

With your file prepared, follow these steps to import sales invoices into Xero:

  1. Log into Xero and navigate to Business > Invoices. This opens your sales invoices list, where you can view all existing draft, awaiting payment, and paid invoices.

  2. Click the Import button in the top-right area of the invoices screen. Xero opens the import dialog.

  3. Select your CSV file from your computer. Xero accepts .csv files only, so if you prepared your data in Excel, export it as CSV before uploading.

  4. Review the column mapping screen. Xero displays a mapping interface showing how each column in your CSV maps to a Xero invoice field. If your column headers match Xero's defaults (ContactName, InvoiceNumber, InvoiceDate, DueDate, Description, Quantity, UnitAmount, AccountCode, TaxType), the mapping happens automatically. If your headers differ, use the dropdown menus to manually assign each column to the correct Xero field.

  5. Check the validation preview. After mapping, Xero runs validation against your data and shows a preview of the invoices that will be created. Red highlights indicate problems: mismatched account codes, unrecognized tax types, missing required fields, or date formatting errors. Yellow warnings flag non-critical issues such as new contact names that Xero will create on import.

  6. Fix any errors before proceeding. If the preview shows red-highlighted rows, cancel the import, correct the issues in your CSV file, and re-upload. Attempting to push through with errors results in skipped rows or rejected imports.

  7. Confirm the import. Once the preview shows no errors, click Complete Import. Xero processes the file and creates the invoices.

  8. Review the imported invoices. All imported invoices appear with Draft status in your Invoices list. Open each invoice (or spot-check a representative sample) to verify that amounts, dates, contact details, and line items are correct. Approve invoices individually or in bulk when you are satisfied with the data.

Tips for Batch Imports

  • Start with a small test batch. Import 5 to 10 invoices first rather than your entire file. This catches formatting issues, incorrect account codes, or tax type mismatches before they affect hundreds of records.
  • Respect Xero's line limit. Each CSV file can contain a maximum of 500 invoice lines. A single invoice with 3 line items counts as 3 lines toward this limit. For larger imports, split your CSV into multiple files and import them sequentially.
  • Watch for duplicate contacts. When a contact name in your CSV does not match an existing Xero contact exactly, Xero creates a new contact record automatically. After importing, navigate to Contacts > All Contacts and search for duplicates. Merge any duplicate entries to keep your contact list clean and ensure accurate reporting.
  • Keep your original CSV file. Save the source file until you have verified the import fully. If something goes wrong, having the original makes it straightforward to delete the draft invoices and re-import a corrected version.

How to Import Purchase Bills into Xero

If your accounts payable workflow involves dozens (or hundreds) of supplier invoices each month, importing purchase bills into Xero via CSV eliminates repetitive manual data entry. The process mirrors the sales invoice import, but uses a different navigation path, a separate CSV template, and purchase-specific field values. If you manage books across multiple platforms, the same supplier-side decisions also come up in FreeAgent bill import workflows.

Step-by-Step: Import Bills into Xero CSV

The import process follows the same upload-map-validate-confirm flow as sales invoices. The key differences:

  1. Navigate to Business > Bills to pay (not Business > Invoices). Select Business in the top menu, then choose Bills to pay from the dropdown.

  2. Click Import and select your CSV file. On the mapping screen, pay particular attention to ContactName (supplier, not customer), AccountCode (expense accounts, not revenue), and TaxType (purchase tax rates, not sales). The TaxType column must reference purchase-side rates: "20% (VAT on Expenses)" instead of "20% (VAT on Income)" for a UK organization, for example.

  3. Review validation and confirm. Check that supplier names match existing Xero contacts, account codes resolve to valid expense accounts, and tax types correspond to purchase tax rates. All imported bills appear as Draft entries for review before approval and payment.

Reusable Template Tip for Recurring Suppliers

If you receive invoices from the same vendors regularly, build a reusable CSV template pre-filled with each supplier's name, default account code, and correct purchase tax type. When a new batch of bills arrives, duplicate the template and update only the variable fields: invoice number, date, due date, description, and line amounts. This approach cuts preparation time significantly and reduces mapping errors on every subsequent import.


Migrating Invoices from QuickBooks, Sage, or FreshBooks

Switching accounting platforms means moving more than just invoice records. Contacts, chart of accounts, bank transactions, and historical data all need to land correctly in Xero for the migration to hold up under scrutiny. Xero's Conversion Toolbox handles this as a coordinated, one-time migration rather than a piecemeal file-by-file import.

Using Xero's Conversion Toolbox

The Conversion Toolbox is accessed from Settings > General Settings > Conversion in Xero. It is purpose-built for full accounting migrations, importing invoices alongside contacts, account codes, bank transactions, and other financial records in a single guided workflow. The tool validates all data before the final import and flags conflicts such as duplicate contact names or account code mismatches, giving you the chance to resolve issues before anything posts to the ledger.

This is a one-time migration tool, not a recurring import mechanism. Once the conversion is finalized, the Conversion Toolbox locks and cannot be rerun.

QuickBooks to Xero

The Conversion Toolbox directly supports both QuickBooks Online and QuickBooks Desktop exports. The process follows a consistent pattern:

  1. Export your data from QuickBooks. Xero provides version-specific export instructions for QuickBooks Online and each Desktop edition (Pro, Premier, Enterprise).
  2. Upload the exported files to the Conversion Toolbox in Xero.
  3. Map your QuickBooks accounts and fields to their Xero equivalents. The tool suggests default mappings, but review each one carefully since chart of accounts structures often differ between platforms.
  4. Review the validation report. Both sales invoices and purchase bills transfer, along with their line items, tax codes, and contact associations.
  5. Confirm and run the import.

Pay particular attention to tax code mappings. QuickBooks and Xero handle tax differently, and incorrect mappings create reconciliation problems that compound over time. For firms that also need to move data in the other direction, the QuickBooks invoice import process has its own set of methods and format requirements worth understanding before a migration.

Sage and FreshBooks to Xero

For supported Sage and FreshBooks versions, the Conversion Toolbox accepts their exports through the same guided migration workflow. For unsupported Sage versions, export invoices as CSV and use Xero's native CSV import instead — this requires manual field mapping but works reliably for any version that supports CSV export. If you only need to migrate a subset of invoices (outstanding balances, a specific date range), native CSV import gives you more control than a full migration regardless of platform.

When to Skip the Conversion Toolbox

For partial migrations where you need to import a specific set of invoices rather than an entire accounting history, native CSV import is faster and more targeted. Common scenarios include:

  • Importing only unpaid or outstanding invoices from the previous platform
  • Migrating a single client's invoice history during a bookkeeping handover
  • Bringing over invoices from a specific date range rather than the full ledger

When direct export paths are limited, OCR tools that integrate with accounting platforms like Xero can bridge the gap by reading invoice PDFs and producing import-ready CSV files.

In each of these cases, export the relevant invoices as CSV from your current platform, adjust the column headers to match Xero's required format, and import using the steps outlined in the sales invoice or purchase bill import sections above.

One common migration scenario falls outside both CSV import and Conversion Toolbox workflows entirely: when the invoices you need to bring into Xero exist only as PDF documents or paper records.


Converting PDF Invoices to Xero-Ready CSV Files

Every import method covered so far assumes your invoice data already exists in a structured format, whether a CSV file, an Excel spreadsheet, or an export from another accounting platform. In practice, many businesses receive invoices as PDF email attachments, scanned paper documents, or downloaded files from supplier portals. These unstructured files cannot be uploaded directly to Xero's CSV import tool. The data has to be extracted and formatted first.

Manually keying data from each PDF into a CSV template works for five or ten invoices but breaks down at volume — transcription errors, inconsistent supplier names, and hours of repetitive work become inevitable.

Using an Extraction Tool for PDF-to-CSV Conversion

A more practical approach is to use a data extraction tool that reads PDF invoices and produces structured output matching Xero's column requirements. The workflow follows four steps:

  1. Upload your PDF invoices in batch. Rather than processing files one at a time, upload an entire folder of vendor invoices for a given period.
  2. Specify the fields to extract. Tell the tool exactly which columns you need, using Xero's field names: ContactName, InvoiceNumber, InvoiceDate, DueDate, Description, Quantity, UnitAmount, AccountCode, TaxType, and Total.
  3. The tool reads each PDF and extracts the data into a structured CSV or Excel file, with one row per line item across all invoices.
  4. Review the extracted data before uploading. Check that supplier names are consistent (the same vendor may appear as "ABC Ltd" on one invoice and "ABC Limited" on another), dates follow your Xero organization's format, and account codes map correctly. Then upload to Xero using the native CSV import process described in the earlier sections.

Tools like Invoice Data Extraction are built for this workflow at scale, handling batches of up to 6,000 PDF files in a single job. Rather than configuring rigid templates, you specify what to extract using natural language prompts. A prompt targeting Xero's CSV format might look like:

"Extract ContactName, InvoiceNumber, InvoiceDate, DueDate, Description, Quantity, UnitAmount, Total. Format dates as DD/MM/YYYY. One row per line item."

The tool reads each invoice, identifies the relevant fields, and outputs a structured CSV or Excel file ready for Xero import. For a deeper look at the extraction process, see this guide on converting PDF invoices directly into Xero.

Building a Repeatable PDF-to-Xero Workflow

When vendor invoices arrive as PDFs every month, the real efficiency gain comes from creating a saved extraction prompt configured to Xero's exact CSV column format. With AI-powered invoice data extraction, you can save your Xero-specific prompt to a prompt library and reapply it each month without rewriting instructions.

The repeatable workflow becomes:

  1. Collect that month's PDF invoices into a single batch
  2. Upload to the extraction tool and apply your saved Xero prompt
  3. Download the formatted CSV output
  4. Review the extracted data for accuracy
  5. Import to Xero using the native CSV import

This turns what was a multi-hour manual data entry task into a process that takes minutes, with consistent field formatting across every import cycle.


Fixing Common Xero Invoice Import Errors

A failed Xero invoice import typically produces a generic error message that does not pinpoint the exact row or field causing the problem. The fastest path to resolution is matching your error against the known failure modes below, each with a specific fix.

"Contact not found" or duplicate contact creation. The ContactName value in your CSV does not exactly match an existing Xero contact. Even minor differences cause failures or, worse, Xero silently creates a new contact record, leaving you with duplicates. Check for spelling variations, trailing spaces, and abbreviation mismatches ("ABC Ltd" versus "ABC Limited" versus "ABC LTD"). The fix: before importing, export your full Xero contact list from Contacts > Export, then run a comparison against your CSV's ContactName column. Correct any discrepancies in the CSV before uploading.

Date format mismatch. InvoiceDate or DueDate values do not align with your organization's configured date format. This is the most frequent issue for firms working across regions. A UK or Australian organization set to DD/MM/YYYY will misinterpret a US-formatted date like 03/07/2026 as 3 July instead of March 7. To resolve this, navigate to Settings > General Settings and confirm your Date Format setting, then ensure every date in your CSV uses that exact format. Pay attention to separator characters as well: slashes, hyphens, and dots are not interchangeable.

Invalid AccountCode. The AccountCode field references an account that does not exist in your Xero chart of accounts. This commonly happens when you use an account name (like "Office Expenses") instead of the numeric code (like "429"), or when you reference an account that has been archived. Export your chart of accounts from Settings > Chart of Accounts, then cross-reference the exported codes against your CSV. Use the exact code values from the export, not account names or codes copied from another accounting system.

Tax rate mismatch. The TaxType value does not match a configured tax rate name in Xero. This field requires the full tax rate label exactly as it appears in your settings, not an abbreviated version. For example, you need "20% (VAT on Income)" rather than just "20%" or "VAT". Additionally, sales invoices and purchase bills draw from different tax rate sets, so a valid TaxType for a sales invoice may be rejected on a bill import. Check Settings > Tax Rates, note the exact labels for your invoice type (sales or purchases), and update your CSV to match those labels character for character.

Duplicate InvoiceNumber. Xero rejects any CSV row containing an invoice number that already exists in the system. This frequently occurs when re-importing after a partial failure, since the first attempt may have created draft invoices for some rows before the error halted the process. Search your Xero invoices for the duplicate numbers. If they exist as drafts from a previous failed import, delete those drafts before re-uploading. For ongoing imports, maintain a log of successfully imported invoice numbers to avoid resubmission.

Row limit exceeded. Xero's CSV import accepts approximately 500 lines per file. Multi-line invoices count each line item as a separate row, so a file with 100 invoices averaging five line items each would hit 500 lines. Split your CSV into multiple files, each containing fewer than 500 rows. Keep all line items for the same invoice together in one file, since Xero groups multi-line invoices by the InvoiceNumber field. Import each file sequentially.

Currency code errors. For multi-currency organizations, the CurrencyCode field must contain a valid three-letter ISO 4217 code such as GBP, USD, EUR, AUD, or NZD. The currency must also be enabled in your Xero organization before import. Verify that Settings > Currencies lists the currency you are importing. Add any missing currencies there first, then confirm your CSV uses the standard three-letter code with no extra characters or spaces.

Before running any import, work through this pre-import checklist to catch most errors in advance:

  • Export and validate contact names against Xero's contact list, correcting mismatches in the CSV
  • Confirm the date format in your CSV matches Settings > General Settings > Date Format
  • Export the chart of accounts and verify every AccountCode in the CSV exists and is active
  • Check Settings > Tax Rates and confirm every TaxType value matches the exact label for your invoice type
  • Search for existing invoice numbers that overlap with the CSV to prevent duplicate rejections
  • Count total rows and split files that exceed 500 lines
  • Test with a small batch of 5-10 invoices before importing the full file

For a deeper walkthrough of error resolution workflows and edge cases, see our dedicated guide to fixing Xero CSV import errors.


After the Import: Verification and Approval Workflow

Every invoice imported via CSV enters Xero with Draft status. Draft invoices are not posted to the general ledger and do not appear in financial reports, aged receivables, or aged payables until they are approved. This is a deliberate safety mechanism that gives you a window to review imported data before it affects your books.

Post-Import Verification Checklist

Before approving any batch of imported invoices, work through these verification steps:

1. Confirm the invoice count. Compare draft invoices created against CSV rows (accounting for multi-line invoices sharing the same InvoiceNumber). If counts do not match, check the import summary for skipped rows.

2. Spot-check individual invoices. Open 3-5 invoices at random and verify ContactName, dates, line items, amounts, and tax calculations against your source data.

3. Verify account code mapping. Navigate to Reports > Trial Balance to confirm revenue and expense lines landed in the correct accounts. Incorrect account codes are the most common silent error — the import succeeds even if you mapped a phone bill to an office supplies account.

4. Validate supplier and tax details on purchase bills. For imported bills, confirm that supplier names match existing contacts in Xero and that tax types (e.g., GST on Expenses, BAS Excluded, No GST) are correct. Getting tax types right at import is especially important for Australian organizations, where these codes feed directly into Xero BAS preparation and GST reporting. Correcting tax types after approval requires reversing and re-entering the bill, so catching errors at the draft stage saves significant rework.

Approving Imported Invoices

Draft invoices can be approved individually or in bulk.

For sales invoices: Navigate to Business > Invoices, then filter by Draft status. Select the invoices you want to approve using the checkboxes, then choose Approve from the batch actions menu. All selected invoices will be posted to the ledger and become available for sending to customers.

For purchase bills: Navigate to Business > Bills to pay, then filter by Awaiting Approval. Select the bills and approve them in bulk using the same batch action approach. Once approved, the bills will appear in your aged payables and can be scheduled for payment. Organizations that need multi-step sign-off or role-based controls beyond this basic flow should consider setting up a structured bill approval workflow in Xero before importing large batches, since approval routing is easier to configure before bills start queuing up.

Bulk approval is available for both invoice types and is the practical approach for any import of more than a handful of records.

Continue Reading

Extract invoice data to Excel with natural language prompts

Upload your invoices, describe what you need in plain language, and download clean, structured spreadsheets. No templates, no complex configuration.

Exceptional accuracy on financial documents
1–8 seconds per page with parallel processing
50 free pages every month — no subscription
Any document layout, language, or scan quality
Native Excel types — numbers, dates, currencies
Files encrypted and auto-deleted within 24 hours