Short answer, yes. Long answer, it may or may not have consequences depending on the contract and why you’re backing out. Prior to a seller accepting an offer from you, you can withdraw your offer anytime. Just be sure you do so in writing. The contract dictates under what terms you can cancel without penalty and how much in damages it would cost you if you just simply changed your mind and defaulted.
Once you and the seller have mutual acceptance, there will usually be contingencies in the agreement that will allow you to walk away without consequence, provided you cannot remove any of those contingencies within the prescribed times. Contingencies that give you the leeway to cancel a sale without any penalty include: the home being able to pass a home inspection, your obtaining loan approval or having to sell another residence first, and the seller being able to produce a clear title.
Photo by Pop & Zebra on Unsplash