Skip to content

bank2ynab/bank2ynab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,367 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bank2ynab

Python testing GitHub issues by-label GitHub open issues GitHub last commit PRs welcome! Lint: ruff Lint

This project consolidates other conversion efforts into one universal tool that easily converts and imports your bank's statements into YNAB.

What? (Features)

Convert your downloaded bank statements into YNAB's input format. Here's what this script does, step by step:

  1. Look for and parse the bank2ynab.conf. This file contains all the rules and import formats.
  2. Look for and parse every CSV file in the configured download directory.
  3. If the CSV file matches any of the configured formats:
    1. Create a new CSV file in YNAB's CSV format with the correct columns and a blank Category column.
    2. Optionally delete the original CSV file.

Wish List

  • add many more input formats from all the other YNAB-CSV-conversion projects.
  • maybe coming later: automatically download your bank statements? (uses external services; only available in some countries)
  • maybe coming later: automatically import the converted data into your YNAB app? (optional, default off)

Why?

There are currently more than 80 GitHub projects related to YNAB converter scripts. Clearly there's a need, but until now these solutions have been fragmented. The present project "bank2ynab" aims to focus the efforts on a common source that encapsulates a large number of bank formats. This will also provide a common basis for a solution using a variety of programming languages.

How? Contribute!

Installation Instructions

  • Install from PyPI: pip install bank2ynab
  • Or install from source (recommended for contributors):
    • git clone https://github.com/bank2ynab/bank2ynab.git
    • cd bank2ynab
    • uv sync
  • Then follow the User Guide below.

Requirements

  • Windows or Mac or Linux
  • Python v3.9+ installed (download it from python.org)
  • Support for other scripting languages may follow. Contributions are welcome!

Troubleshooting:

  • If you see RequestsDependencyWarning about urllib3/chardet/charset_normalizer, resync the environment with uv sync --reinstall.

User Guide

Using bank2ynab is easy:

  1. Download some bank statements from your banking website.
    • Make sure to choose CSV format. Save with the default suggested filename so that the converter can find it.
    • It's okay if the statements contain data that you already have in YNAB. YNAB will detect and skip these.
  2. Run bank2ynab once to generate default config files.
    • user_configuration.conf is read from BANK2YNAB_CONFIG_DIR if that environment variable is set.
    • Otherwise it is read from your OS user config directory for bank2ynab.
    • On Windows, that is typically %LOCALAPPDATA%\bank2ynab\bank2ynab\user_configuration.conf.
    • Example: C:\Users\YourName\AppData\Local\bank2ynab\bank2ynab\user_configuration.conf
  3. Check the [DEFAULT] configuration in that user_configuration.conf file. You only need to do this once.
    • Source Path = c:\users\example-username\Downloads sets where downloaded CSV files are read from.
    • Delete Source File = True can be set to False if you want to keep originals.
  4. Check that bank2ynab.conf contains a [SECTION] for your bank format.
  5. Run the converter:
    • If installed from PyPI: bank2ynab
    • If running from source: uv run bank2ynab
  6. If API upload is not configured, import the output CSV manually in YNAB.

YNAB API Import

Use this section if you want bank2ynab to upload transactions directly to YNAB.

  1. Create a Personal Access Token in YNAB (My Account -> Developer Settings -> Personal Access Tokens).
  2. Open user_configuration.conf and set YNAB API Access Token = <your_token>.
  3. Run bank2ynab again.
  4. On first API run for each bank section, choose:
    • Budget
    • Account
  5. The selected mapping is stored as YNAB Account ID = <budget_id>||<account_id> in your user config.

Notes:

  • Config location:
    • BANK2YNAB_CONFIG_DIR if set.
    • Otherwise your OS default user config directory for bank2ynab.
  • Windows example:
    • %LOCALAPPDATA%\bank2ynab\bank2ynab\user_configuration.conf
  • Root-level config files in the project directory are no longer used.
  • If Save YNAB Account = True, account mapping is reused automatically.
  • If token is blank, API upload is skipped and output remains CSV-based.
  • Keep your token private.

Contributors

Contributors

Known Bugs

For details, please see our issue list labeled "Bug".

List of Supported Banks

Here is a list of the banks and their formats that we already support. Note that we have many more formats in the pipeline so the list continues to grow, and we are happy to receive requests. In alphabetical order (country and bank):

  1. AT easybank credit card
  2. AT Raiffeisen Bank 2018
  3. AT Raiffeisen Bank RCM
  4. AT Raiffeisen Bank 2019 checking
  5. AT Raiffeisen Bank 2021 checking
  6. AT Raiffeisen VISA
  7. AU ANZ
  8. AU ING
  9. AU National Australia Bank
  10. BE BNP Paribas Fortis old
  11. BE BNP Paribas Fortis Export
  12. BE KBC checking
  13. BE KBC credit
  14. BE Keytrade Bank
  15. BR Banco Bradesco Checking
  16. BR Banco do Brasil, checking
  17. BR Inter, checking
  18. CA TD Canada Trust, checking+Visa
  19. CH UBS Checking account
  20. CH UBS Checking account - Alternative 1
  21. CH UBS Credit card
  22. CH Neon Monthly Account Statement
  23. CH Neon Yearly Account Statement
  24. CH SwissCard
  25. CH ZKB Konto CSV-Export (Mit Details)
  26. CH ZKB Erweiterte Suche
  27. CH ZKB Finanzassistent-Chronik
  28. CH ZugerKB Kontoauszug
  29. CO Bancolombia
  30. Crypto.com
  31. CZ AirBank checking and savings
  32. CZ Ceska Sporitelna
  33. CZ Raiffeisen bank
  34. DE Amazon VISA LBB
  35. DE Commerzbank checking
  36. DE Consorsbank checking
  37. DE Deutsche Bank
  38. DE Deutsche Bank Credit Card
  39. DE Deutsche Kreditbank checking
  40. DE Deutsche Kreditbank checking new
  41. DE Deutsche Kreditbank credit card
  42. DE Fiducia (Volksbank, Sparda-Bank, BBBank, PSD Bank, Raiffeisen, ...)
  43. DE ING-DiBa
  44. DE Kreissparkasse
  45. DE N26
  46. DE Ostseesparkasse Rostock checking
  47. DE Ostseesparkasse Rostock credit card
  48. DE Sparkasse Rhein-Neckar-Nord
  49. DE Sparkasse Südholstein
  50. DK Bankernes EDB Central
  51. DK Danske Bank
  52. DK Jyske Bank VISA
  53. DK Nordea
  54. DK Portalbank
  55. Hibiscus banking software
  56. HU Erste Bank checking
  57. HU K&H
  58. HU OTP
  59. IE AIB Ireland
  60. IE Bank of Ireland
  61. IE First South Credit Union
  62. IE N26
  63. IE Ulster Bank, savings
  64. IT RomagnaBanca Inbank
  65. LV Swedbank
  66. Mint
  67. MV Bank of Maldives, checking
  68. NETELLER
  69. NL American Express (AMEX)
  70. NL Bunq checking
  71. NL bunqDesktop software
  72. NL bunqDesktop software 2
  73. NL ING
  74. NL ING Checking 2020
  75. NL KNAB
  76. NL Rabobank
  77. NL Rabobank-2018
  78. NL RegioBank
  79. NL Rabobank Credit Card
  80. NO DNB
  81. NO Sparebank 1 VISA
  82. Personal Capital
  83. PL Alior Bank
  84. PL mBank
  85. PL PKO BP
  86. PL Bank Pekao
  87. Revolut
  88. SE Handelsbanken
  89. SE Länsförsäkringar checking
  90. SE Morrow Bank
  91. SE Nordea - internetbanken.privat.nordea.se
  92. SE Nordea - netbank.nordea.se
  93. SE SEB Skandinaviska Enskilda Banken
  94. SE Sparbanken Tanum
  95. SE Swedbank
  96. SE Swedbank 2019
  97. SE Swedbank 2020
  98. SG HSBC Savings Account
  99. SG HSBC Credit Card
  100. SG OCBC Bank
  101. SG OCBC Bank Credit Card
  102. SG POSB savings
  103. SG UOB Savings Account
  104. SG UOB Credit Card
  105. SK Tatra Banka
  106. SK VUB
  107. UK Co-operative Bank
  108. UK Monzo checking
  109. UK Barclaycard credit card
  110. UK Barclaycard Business Credit Card
  111. UK first direct checking
  112. UK John Lewis Partnership Card (Pre-2022 Format)
  113. UK John Lewis Partnership Card (NewDay Format)
  114. US Bank of America
  115. US Bank of America Credit Card
  116. US BB&T
  117. US Chase Credit Card 2017
  118. US Chase Credit Card 2019
  119. US Fidelity CMA
  120. US Schwab Checking
  121. US Schwab Savings
  122. US TB Bank
  123. US USAA
  124. Wise

XKCD on standards: Fortunately, the charging one has been solved now that we've all standardized on mini-USB. Or is it micro-USB? Shit.


Disclaimer: Please use at your own risk. This tool is neither officially supported by YNAB (the company) nor by YNAB (the software) in any way. Use of this tool could introduce problems into your budget that YNAB, through its official support channels, will not be able to troubleshoot or fix. See also the full MIT licence.

About

Easily convert and import your bank's statements into YNAB. This project consolidates other conversion efforts into one universal tool.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages