If you're planning to sell your home soon and have discovered foundation problems, get those fixed before you sell. While it's not uncommon to find houses for sale that need work done, including on the foundation, this is a route you don't want to take unless you have no choice and need to sell fast. The foundation of your home is literally and figuratively the foundation: not only is it the physical base on which your house sits, but the state of the foundation determines whether your house is stable or not. To have that base be unstable is to invite a lot of additional problems.
Unrepaired Foundation Problems Can Lower the Value Substantially
First, selling a home with unrepaired foundation problems can lower the sale value of your house. Even if you don't drop your price, the potential buyers are all going to try to bargain down because, if you aren't going to fix the foundation before selling, they'll have to do it after buying. While foundation repair costs can vary widely, chances are high that the cost of the repair is going to be less than the drop in price that you'd get if you tried to get someone to buy the unrepaired house.
Buyers Might Wonder What Else Is Wrong
Another issue is that, if the foundation is bad, what other problems exist in the house that you don't know about yet? A house for sale with a foundation that needs repair could have other things wrong with it that might pop up unexpectedly and cost the new owners a lot of money. By repairing the foundation before you sell, you can truthfully tell the buyers that nothing else needs repair to your knowledge. And, that repair would make you look like a more responsible homeowner and seller.
You Could Face Legal Issues
Most states have disclosure laws, and even those that don't will have laws addressing health and safety issues that are known to the seller. If you live in a non-disclosure state and don't say anything about the foundation, you could face legal issues later on because a faulty foundation could be reasonably seen as a safety risk. The house can sit oddly, preventing doors from opening and closing, and plumbing and wiring could be at risk depending on what's going on in the foundation.
If you have the foundation repaired before you sell, you have an opportunity to make your house a lot safer and ensure that the whole structure is in good shape. Before you try to sell, call a foundation repair contractor to get a bid and fix whatever's gone wrong.