When to use CSV import
- Your bank doesn't support Open Banking yet
- You want to import transactions from before you connected Open Banking (Open Banking typically only provides 90 days of history)
- You're migrating from another accounting tool and want to bring in your transaction history
- You have a business account that isn't connected via Open Banking
Prefer automatic sync?
If your bank supports Open Banking, connecting it directly is easier and keeps transactions up to date automatically. See the Open Banking guide.
Step-by-step: importing a CSV
-
1Export transactions from your bankLog in to your bank's online banking. Go to your transaction history, select a date range (e.g. the current tax year), and download as CSV. See bank-specific instructions below.
-
2Open Banking Import in MarginIn Margin, click Banking in the left sidebar, then click Import CSV (or go to Settings → Import → Bank CSV).
-
3Select your fileClick Choose file and select the CSV you downloaded. Margin accepts .csv and .xlsx files up to 10MB.
-
4Map your columnsMargin detects common bank formats automatically. If it doesn't recognise your file, use the dropdown menus to map which column is the Date, which is the Description, and which is the Amount.
-
5Review and importMargin shows a preview of the transactions. Check the dates and amounts look right, then click Import. Duplicate transactions (already in Margin) are skipped automatically.
How to export from common UK banks
Barclays
- Log in to Online Banking → select your account
- Click Transaction history → choose a date range
- Click Download → select CSV
HSBC
- Log in → select account → click Statement
- Choose your date range → click Export
- Select CSV format and download
Lloyds / Halifax
- Log in → click your account → Export transactions
- Select date range → choose Internet banking text/spreadsheet (CSV)
NatWest / RBS
- Log in → click your account → Download statements
- Choose date range and format → select CSV
Monzo
- Open the Monzo app → tap your account → tap the ↓ icon
- Select date range → tap Export CSV
- Share the CSV file to your computer
Starling Bank
- In the Starling app, go to your account → tap the menu
- Select Download statement → choose CSV
CSV format requirements
If you're creating or editing a CSV manually, Margin expects at minimum:
| Column | Format | Example |
|---|---|---|
| Date | DD/MM/YYYY or YYYY-MM-DD | 15/04/2025 or 2025-04-15 |
| Description | Text | Amazon Marketplace |
| Amount | Number (negative = debit) | -49.99 or 49.99 |
Example of a valid CSV row:
Date,Description,Amount
15/04/2025,Amazon Marketplace,-49.99
16/04/2025,Client payment - Invoice #12,850.00
Common questions
Will Margin import duplicate transactions?
No. Margin checks for duplicate transactions during import using the date, description, and amount. Transactions that are already in your account are skipped automatically.
My CSV has debit and credit in separate columns — will Margin handle this?
Yes. During the column mapping step, you can set separate "Debit" and "Credit" columns if your bank exports them this way. Margin combines them automatically.
Can I import from multiple banks?
Yes. Repeat the import process for each bank account. Margin keeps each account's transactions separate and correctly attributed.
How many transactions can I import at once?
Margin handles imports of up to 5,000 transactions per file. For larger datasets, split your export into multiple date ranges.
My bank only exports OFX or QIF — can I use those?
Margin currently supports CSV and XLSX only. You can convert OFX or QIF to CSV using a free online converter, or open it in Excel and save as CSV before importing.