Accounting CSV guide
Xero CSV Import Guide: Validator, Templates & Common Errors
Prepare an invoice or bank statement CSV, check its structure locally, and work through the import errors that a file parser cannot catch.
CSV import validator: check the file before Xero
Choose your file, paste CSV text, or select Try sample for a fictional bank statement with three transactions. The first row is always treated as the header in this checker. Review the detected encoding, separator, headers and row widths. Unresolved header, row-width or quote errors block the repaired CSV download; the validation report remains available.
Checked automatically
CSV parsing, duplicate or empty headers, inconsistent row widths, quote issues and encoding signals.
Still needs your review
Xero field requirements, date and amount meaning, account codes, tax types, contacts and existing records. A clean CSV report is not approval to import.
Open a data file to start
The parser runs off the main thread. Once loaded, you can search, sort, validate, repair and export without an account.
The embedded tool is CSV Dock’s general CSV checker. It does not connect to Xero, check your organisation’s records or automatically repair accounting values.
Start with the document type
Xero CSV templates: invoices and bank statements
Choose the import screen before preparing the file. A bank export and a sales invoice represent different things, even when both contain dates and amounts.
Sales invoices
Customer, invoice number and line-item details. Start from the current template in your Xero invoice import screen.
Xero’s US invoice import instructionsBank statements
Dated movements in a bank account. Prepare a statement file and review the column mapping in the bank import workflow.
Xero’s bank CSV instructionsInvoice CSV template and validation checklist
Xero’s US invoice instructions require ContactName and InvoiceNumber; other details can be completed in draft. Keep the downloaded template’s columns and headings. Use MM/DD/YYYY for US invoice dates, and check the guidance for your region.
Each line item uses a row. Repeat the invoice number for lines belonging to the same invoice, and match existing contact names exactly to avoid creating duplicate contacts. Account codes and tax names must be reviewed against your organisation. Read the current invoice rules.
View the invoice review example
This shortened example shows two lines on one invoice. It uses US dates and deliberate account/tax placeholders. It is not the complete Xero template and must not be imported unchanged.
ContactName,InvoiceNumber,InvoiceDate,DueDate,Description,Quantity,UnitAmount,AccountCode,TaxType
Example Customer,DEMO-INV-001,09/01/2026,09/30/2026,Example service,1,100.00,REPLACE_WITH_ACCOUNT_CODE,REPLACE_WITH_TAX_NAME
Example Customer,DEMO-INV-001,09/01/2026,09/30/2026,Example support,2,25.00,REPLACE_WITH_ACCOUNT_CODE,REPLACE_WITH_TAX_NAMEXero bank statement CSV format
Keep the transaction date and transaction amount separate. Optional descriptive fields make it easier to identify a payment later. Confirm the import mapping against Xero’s current bank CSV guide; invoice account-code columns do not belong in this example.
| Example field | What to review |
|---|---|
| Date | One date convention. These examples use US month/day/year. |
| Amount | The signed transaction value, not the account’s running balance. |
| Payee / Description | Readable text. Quote values containing commas so they stay in one cell. |
| Reference | An identifier to compare with the original statement. |
View the bank statement example
Date,Amount,Payee,Description,Reference
09/01/2026,750.00,Example Customer,Invoice payment,DEMO-001
09/02/2026,-85.50,Example Supplier,"Office supplies, September",DEMO-002
09/03/2026,-34.50,Example Provider,Service fee,DEMO-003Download the fictional bank CSV · This is also the checker’s Try sample input.
Separate debit and credit columns
First establish which source column means money in and which means money out. If both store positive magnitudes, one signed amount can be calculated as money in − money out. For example, a receipt of 250 becomes 250.00, and a payment of 40 becomes -40.00. If the source already uses signed amounts, do not negate them again.
The checker does not combine these columns or interpret their meaning for you. Prepare the amounts in the source spreadsheet, verify a known receipt and payment, then inspect the CSV and Xero’s import preview.
Exporting an Excel file for Xero
Save the intended worksheet as CSV, or use the Excel to CSV converter. Check that dates, decimal values and codes survived the export. If Excel removed a leading zero, recover it from the original value; adding zeros by guesswork can change the destination account.
Xero CSV account code errors: what to check
A syntactically valid CSV can still contain a code that is wrong for your organisation. Use the current chart of accounts as the reference; the local checker cannot tell whether an account exists, is available for this transaction, or is the right accounting choice.
- Compare the exact
AccountCodetext with Xero, including any leading zeros. Inspect the source before trimming or changing characters. - Confirm you used the account code rather than its display name. A code copied from another organisation may mean something different.
- Check the current account status and the import’s error message in Xero. Choose any replacement based on the intended transaction.
- Review
TaxTypeseparately. A matching account code does not establish that the tax selection is correct.
See invoice field guidance and Xero’s chart-of-accounts guidance. For spreadsheet formatting, read how to keep leading zeros in CSV and Excel.
Common Xero CSV import errors and fixes
Start with the visible symptom. File-format repairs and organisation-specific corrections are different steps.
| Symptom | Check | Next step |
|---|---|---|
| The file opens in one column or fields shift | The delimiter may be wrong, or a comma inside a description may be unquoted. | Review the column preview. Set the detected separator explicitly, then export comma-separated CSV. Keep commas inside quoted fields. Delimiter guide. |
| A date imports as the wrong day or month | A value such as 09/10/2026 is ambiguous without a known date convention. | Compare with the original record and the chosen Xero import format. Use one convention throughout; do not globally swap every date without checking. Xero bank import errors. |
| An amount is rejected or has the wrong sign | The selected column may contain currency text, a running balance, or the wrong debit/credit interpretation. | Confirm the transaction amount, compare a known receipt and payment, and check the totals. A balance column is not a transaction amount. Bank amount example. |
| An invoice account code or tax type does not match | The value may differ from the current organisation, or a spreadsheet may have altered a code. | Compare the exact value with Xero. Do not guess a replacement account or change tax treatment just to make a file import. Account-code checklist. |
| A repeat import creates unexpected records | The date range, invoice numbers or contacts may overlap with data already entered. | Review the existing records and the import preview before retrying. Removing identical CSV rows alone cannot establish that the import is safe. Final review checklist. |
Before importing the corrected CSV
- Keep the original file. Reopen the output and compare its row count, headers and several known values.
- Review transaction dates, signs and totals against the source. The fictional bank sample has three rows and a net amount of 630.00.
- Check the destination organisation, account and import type, then review Xero’s preview or draft records.
- Compare with existing data before retrying an import. An empty parser error list does not rule out duplicate business records.
Need to fix text encoding or separators first? Use the guides to CSV encoding and semicolon-to-comma conversion.
Frequently asked questions
Is this a Xero CSV import validator?
This page includes a free CSV structure validator and a Xero import guide. The tool checks parsing, encoding, headers and row shape. It does not validate Xero-specific required fields, dates, account codes, tax types or existing records, and a clean report does not guarantee Xero will accept the file.
Where do I get a Xero invoice CSV template?
Download the current template from the invoice import screen in your own Xero organisation. The example on this page is a small review exercise with placeholder account and tax values; it is not a replacement for that template.
Can I use the same CSV for invoices and bank statements?
Use the workflow that matches your data. An invoice contains customer and invoice-line details; a bank statement contains dated money movements. Formatting one as the other can create the wrong records.
Can the checker fix a Xero account code error?
The checker can help expose a split column or altered text, but it cannot know which accounts exist in your Xero organisation. Compare the code with your current chart of accounts and review the destination account before changing the CSV.
Can I prepare a Xero CSV from Excel?
Export the intended worksheet as CSV, then inspect the resulting text and columns here. Check identifiers with leading zeros, date interpretation and amount signs. Renaming an XLSX file to .csv does not convert it.
Sources and file handling
Guidance reviewed September 12, 2026. Examples use US dates; regional templates and the options shown in your Xero organisation take precedence.
- Xero: import customer invoices (US)
- Xero: import a CSV bank statement
- Xero: resolve manual bank statement import errors
Selected files are processed in your browser. Choosing to load a public URL makes a request to that address. CSV Dock does not connect to Xero or send your selected file to it. CSV Dock is independent and is not affiliated with Xero.