What happens if I update my jailbroken iPhone to iOS 7?

I have a jailbroken iPhone 4S. The jailbroken software's running iOS 5.5 I think. Now, I just want to upgrade to iOS7 and want to remove the jailbreak. I;ve heard that doing that causes your phone to format completely. Ideas?

No it shouldn't be. It should be safe for you to update to iOS 7 without losing your data (except your jailbreak). But before you update always make sure you back up your phone with iTunes.

If you update your jailbroken iPhone 4S from iOS 5 to iOS 7 then you will get a new iOS without any jailbreak settings (it's not a format but an update). Basically, it's the same as a regular update. Only your jailbreak will be deleted while pictures and other contacts will remain as they are. To prevent any inadvertent deletions, take a backup before updating.

There was never an iOS 5.5.

Yes updating or restoring a jailbroken iOS device will remove the jailbreak.