Can I restore my iPhone if jailbreak fails?

If jailbreak fails for instance like my iPhone won't turn on at all or freezes, can I restore it connected to iTunes on a computer?

If so I would like to know the steps in case I mess up badly.

It should be able to in most cases.

There are many articles online covering that.

  • When you restore an iphone from itunes backup does it restore messages? I need to restore my iPhone 4S in iTunes, will I lose my messages or will it leave the messages from my most recent back up?
  • Itunes fails to download iPhone Software Update during restore When i try to restore my iPhone itune starts the restore by first downloading this thing named as iPhone Software Update ( even though my iphone is aLREADy running 7.0.3) . Whenever 50-60 MB of it has been downloaded by itunes the download speeds gradually slows down to 0 and download fails. Why is this happening. Its not a problem with my internet connection.
  • IPhone stuck on apple logo after jailbreak can't even DFU restore, ANY SOLUTION? It was ios 7.03, and I used Endevi0r7, and I was never jailbreaked before this, so SHSH either. IPhone stuck on apple logo after jailbreak can't even DFU mode restore with Itune, ANY SOLUTION? Has the Jailbreak team ever come up with anything for a situation like this after jailbreak for iso 4, 5 6 came out?
  • Imovie iphone app fails to upload to youtube? I've been trying to upload a video for 2 days now that i made on the imovie app by clicking share to youtube. The uploading to youtube bar starts and gets to the L in uploading snd then says failed to upload to youtube. WHAT DO I DO! I really wanna put these videos up! Is it cuz my title is to long? I put the setigs as large (recommended) and public. And the video is 9min long. It seems long but i no so many ppl who have had vids that long and they upload fine. WHAT DO I DO!