{"id":19253889,"url":"https://github.com/rixx/ynab-downgrade","last_synced_at":"2025-06-24T10:33:51.342Z","repository":{"id":43885698,"uuid":"425060820","full_name":"rixx/ynab-downgrade","owner":"rixx","description":null,"archived":false,"fork":false,"pushed_at":"2022-02-14T12:52:31.000Z","size":35,"stargazers_count":12,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-01T13:51:15.642Z","etag":null,"topics":["ynab"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rixx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-05T19:20:59.000Z","updated_at":"2023-12-26T07:51:59.000Z","dependencies_parsed_at":"2022-08-28T13:41:17.881Z","dependency_job_id":null,"html_url":"https://github.com/rixx/ynab-downgrade","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixx%2Fynab-downgrade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixx%2Fynab-downgrade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixx%2Fynab-downgrade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixx%2Fynab-downgrade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rixx","download_url":"https://codeload.github.com/rixx/ynab-downgrade/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250070371,"owners_count":21369859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ynab"],"created_at":"2024-11-09T18:33:49.302Z","updated_at":"2025-04-21T14:32:19.862Z","avatar_url":"https://github.com/rixx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"- [HOW-TO: Downgrade from nYNAB to YNAB4](#how-to-downgrade-from-nynab-to-ynab4)\n  - [Caveats](#caveats)\n  - [Preliminaries](#preliminaries)\n  - [Step 1: Creating accounts](#step-1-creating-accounts)\n  - [Step 2: Creating categories](#step-2-creating-categories)\n  - [Step 3: Splitting the payment export file](#step-3-splitting-the-payment-export-file)\n  - [Step 4: Importing files](#step-4-importing-files)\n  - [Step 5: Cleanup](#step-5-cleanup)\n  - [Step 6: Budget import (optional)](#step-6-budget-import-optional)\n  - [Appendix 1: YNAB 4](#appendix-1-ynab-4)\n\n# HOW-TO: Downgrade from nYNAB to YNAB4\n\nThis page explains how to move from nYNAB to YNAB4 while retaining as much information as possible. See [Appendix\n1](#appendix-1-ynab-4) for reasons and how to get YNAB4 running.\n\nYou will *export* your current nYNAB budget, then perform some scripted steps on the exported data, and then gradually\nimport it into a new YNAB4 budget. The scripted steps assume that you have Python 3 installed know how to use it. (If \nanybody wants to improve this guide with setup instructions, PRs are welcome!)\n\nSadly, there is not much scripted at the moment – you will spend time on manual tasks. But at least, this page supplies\na guide for handling this stuff a bit better.\n\n## Caveats\n\nDon't expect an automated and smooth process – this repo is more of a guide with two helper scripts. If things go wrong,\nyou can always delete your YNAB4 data and start again. Since we're starting with a new YNAB4 budget, nothing will be\nlost.\n\nSplit transactions won't be imported as splits, but rather as individual transactions. The memo field will say \"Split\n1/n\" though, so you'll still see which transactions belonged together.\n\nI also don't use many YNAB features including loans and separate credit card accounts, so the import might not work\ncorrectly for them. Please open PRs with updates if you find required changes, or comment on the main issue if it worked\nfor you with a specific scenario, so others will know what works and what doesn't!\n\n## Preliminaries\n\n**In nYNAB:** Check if any of your category names contain a : or a `, as those are not valid characters in YNAB 4.\nChange these category names now. Also unhide all of your previously hidden categories, as\nthe import will otherwise not work for them, and you'll have to recategorise them manually. (Not a big deal because\nthey will be easy to filter for, but annoying regardless).\n\n**In nYNAB:** Export your nYNAB budget by clicking on the budget name in the upper right hand corner → Export Budget.\nDownload the resulting zip file (once your browser has stopped freezing if your budget is a bit older), and extract the\nzip archive. It contains two files: `BudgetName as of date - Budget.csv` and `BudgetName as of date - Register.csv`.\nI'll refer to these as `Budget.csv` and `Register.csv` from here on out.\n   \n**In YNAB4:** Install YNAB 4 (see [Appendix 1](#appendix-1-ynab-4)) and set up a new budget. Set the directory to some\nplace that works well for you (some location you will backup or sync, for example) in the File → Preferences dialog.  Go\nto the directory you selected: You will find a directory called `My Budget~number.ynab4`.  Inside, there is a\n`data1~number` directory, and inside that, there is a directory that is just one long UID, looking like\n`98C499B4-4B29-6CC5-3B7A-F0247E9E2551`. Open this directory – it will contain a `budgetSettings.ybsettings` file and a\n`Budget.yfull` file. If you're using windows you may have to click view hidden items in the file explorer toolbard, to see the directory. I will call this directory \"YNAB4 data directory\" from here on out. \n\n## Step 1: Creating accounts\n\nAs a first step, create all your accounts in YNAB 4. Please make sure they are spelt *exactly* like in nYNAB.\n**Take care to also create closed accounts!**\n\n*(It's probably not worth to automate this step, especially since the nYNAB export does not contain account information\nlike the account type, so even if we write an importer, we'd still have to manually correct the account type, and people\nusually have a limited amount of accounts.)*\n\nNow's a good time to make a backup of your YNAB4 data directory, because if something down the line fails, you won't\nwant to go through this a second time.\n\n## Step 2: Creating categories\n\nWhile accounts are limited in number, categories can be a lot, so I wrote a tiny importer. Make sure to close YNAB 4\nbefore running it – it overrides the data file on closing!\n\n```bash\npython create_categories.py path/to/Budget.csv path/to/ynab4_data_directory\n```\n\n## Step 3: Splitting the payment export file\n\nIf you have ever transferred money from account A to B, this transaction shows up in the account A export and the\naccount B export – but since YNAB 4 does not know that we'll provide both imports, it also auto generates the matching\ntransfer transaction, so every transfer exists twice. You could import them anyway but you will need to go through the list of all transactions, filter for\nTransfer, and delete every other one :/\n\nThankfully we can do it another way. Open the Register.csv file and in the data tab of excel, select filter. Now using the filter buttons that appear in the first row, filter first by payee and select all that start with \"Transfer:\". Now filter by inflow or outflow and select only 0.00. This give us a complete list of every transfer in our budget history. More specifically, it shows us one side of every transfer. On the home tab in excel, click Find \u0026 Select and chose \"Go To Special\". Select \"Visible Cells only\" and click done. We want to delete everything it has selected except for the first row which contains our headers. Hold control and click row 1 to deselect the headers. Now hit delete and save the file. \n\n\nNow run the second split to take apart the transaction export – YNAB 4 can only import on a per-account basis.\n\n```bash\npython split_export.py path/to/nynab_data_directory/Register.csv\n```\n\nThis will place one CSV file for each account in your working directory, and will replace some terms to make successful\nimports more likely.\n\n## Step 4: Importing files\n\nYou'll want to import every file next, each under the appropriate account. Make sure to select Year/Month/Date as time\nformat, as well as \"Include transactions before account start date\".\n\nNext, approve all transactions and recategorise if any did not receive a matching category on import. This shouldn't\nhappen, but probably will in some edge cases. If YNAB can't find a category, it should put the category in the memo\nfield, so that in most cases, you can search for that field, bulk-select and handle the transactions fairly quickly.\n\n\n## Step 5: Cleanup\n\nNow, chances are, some accounts won't have the correct balance. I'm not quite sure what's going on, to be quite honest.\nOut of my 7 accounts, 2 were off (one by a bit, one by a bit more), the other five came out correct. Things to check:\n\n- An imported starting balance can be marked incorrectly, either change the flow direction or delete it.\n- Mark a suspect time period (first and last month / year / quarter) in both nYNAB and YNAB 4 and compare the totals.\n- Did scheduled transactions get imported too? If your balance is too high check that future transations haven't been imported.\n- Sometimes the starting balance might be weird, if you see any transations that are huge and going into outflow right at the start of your budget, labeled starting balance, try deleting these.\n\nNow, once all the account totals are correct: **you can be done**. Just copy your current category bucket total into\nyour YNAB 4, and you're ready to go. Congratulations!\n\n## Step 6: Budget import (optional)\n\nUnless you want your budget history to be imported, too – do you want to know how much money you set aside for vacation\nin 2017? … If so: **quit YNAB 4 and make a backup of the directory**! Seriously: Your current state is very good and\nyou really don't want to repeat the work you just did if the budget import screws up somehow.\n\nThen run:\n\n```bash\npython import_budgets.py path/to/Budget.csv path/to/ynab4_data_directory\n```\n\nAll your budget data should get imported. Please let me know if this doesn't work – I'm making a few assumptions but\nmost currency formats should be recognized. You might also try entering a random number into your first month (e.g. \nApril 2016) in YNAB 4 if the import fails – this will cause YNAB to create all the monthly buckets, so that the importer\nonly has to add the correct numbers.\n\nIf your import seems to be getting hung up on hidden categories, try setting the `pass_category_errors` variable in `import_budgets.py`\nto true, this will skip over these errors and if you only have a few hidden categories it might be worth having most of your\nbuget history rather than none of it. \n\nWhen you open YNAB 4, the total budgeted numbers per category should be correct – if you use future budgeting a lot, it\nmight look off at first, because you'll have large visible numbers as \"not budgeted\". These numbers are correct though,\nand should line up with what you see in the breakdown when you click the month's total in nYNAB.\n\n## Appendix 1: YNAB 4\n\nYNAB 4 is a desktop application that was the predecessor of the web version, commonly called nYNAB (or just YNAB). YNAB\n4 did not have a subscription model, but can't be purchased anymore. If you bought it back in the day, you can still use\nyour activation key. You might also have bought it on Steam, where it will still be activated for you.\n\nIf you *didn't* purchase YNAB 4, you can still download it and run through the 1-month trial. There are trivial ways to\nextend or repeat or circumvent the trial duration, however, as those are naturally against the TOS of YNAB, I will not\ndocument or endorse them here.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frixx%2Fynab-downgrade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frixx%2Fynab-downgrade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frixx%2Fynab-downgrade/lists"}