After filing for bankruptcy, your credit score is going to take a hit. Rebuilding your credit will also take a few years.
It is also true that a bankruptcy can appear on your credit report for up to 10 years. However, filing for bankruptcy and being financial responsible afterwards will allow most debtors to have their credit scores back in the 700's within a few years.
How is this possible? Any individual considering filing for bankruptcy probably has poor credit already. Filing for bankruptcy may be the best bet to “get good credit” again, because when a debtor files for bankruptcy under Chapter 7 of the Bankruptcy Code and receives a discharge of their debt (a court order relieving the debtor of the obligation to pay debts).
Someone who is considering bankruptcy probably has a credit report that lists multiple late/missed payments, collections accounts, and charged-off balances. All these things really ding your credit. Once you file for bankruptcy, these negative marks go away and all that shows is that the debt was discharged through bankruptcy.
On top of this, your debt-to-income ratio will greatly improve. All those credit cards and revolving debts will be discharged, thus significantly lowering your debt-to-income ratio. For many individuals it would take 10-20 years to pay off their credit cards, due to interest rates and other penalties. Because of this, filing for bankruptcy is the quickest way to rebuild your credit.