Okay so I took my phone to the apple store and they said that it was a loose connector, took my phone opened it up and connected it. After giving it back to me we checked it and it was fine but now less than a day later the rattle is back but less pronounced. I'm taking it back today.
If it's a rattle in the upper left, It is the vibe motor. There is a part in your phone that spins to shake the phone. If it didn't move there would be no vibration. Those of you getting replacement phones are getting it because the store knows most will get a placebo effect and be happier with the replacement even though there is no difference what so ever.
Vibe Motor, Vibe Motor, Vibe Motor.
Your phone is fine. Deep breath, your phone is fine.
Don't forget that there are a number of phones out there that have loose batteries which is a totally different issue. A loose battery is easy to identify and if a fairly solid clunk rather than a rattle.
Noise Problem cured !!!
My iPhone 5 made a rattling noise when shaken after it had "a few falls"
I read in one of the forums that it was the battery coming away from the adhesive.
I checked iFixit teardown of the iPhone 5 and noted the very large battery which occupies two thirds of the screen space from left to right (starting from above the headphone jack side).
I'm not surprised that if it comes loose that it is the cause of the clunking rattle.
One of the forums contributors suggested gradually pressing all the area of the phone on the outside that overlies the battery inside pressing hard between front and back over all of the screen area from left to right that fronts the battery inside. In this way one pushes the battery back on to the adhesive !!
It works perfectly - Problem cured !! - J B Walsh
Slight panic and people immediately run back to the store. I picked up my old Nokia 5530 and also hear the sound of vibrating motor, it is normal. If it were not vibrate, it would not make noise.
There is a moving part in your phone. It is supposed to move. It is your vibe motor. Please for the love of all that is good, google "iPhone vibe motor" and look at the images of it. It is a weight on a spindle attached to a motor. It spins, which means it moves. If you shake the phone it moves. Movement = noise. If you take it to a store they will swap it for a refurbished one because it is faster to give you a replacement than it is for them to try explain what is really going on and you are less likely to score them low if you get the survey.
If it was a loose connector something would stop working or cut in and out, Touch ID/home button, camera, ear piece, battery.
Your phone is fine. Truly it is fine. Apple makes millions of phones. They all rattle because they all are capable of vibrating. Some people hear the rattle others don't, some motors are tighter than others, but they are within the designed spec (tolerance).
Your phone is fine.