My key is stuck in the door lock and won't come out. I have tried numerous ways and it just won't. Any ideas on how to get it out or what can be done?
Don't laugh, this may work as I have used it on stuck or cross-threaded bolts and locks. Remember that heat makes metals expand, while cold makes metals contract. Looks like the usual 5-pin tumbler lock.
I do not know how the key is stuck, but brass is a soft metal. After long term use the surface can becomes rounded and not move the tumblers correctly. The tumblers could be stuck from dirt or other contaminants.
Try oiling the key first by forcing WD-40 or a light motor oil into the lock and tap the key lightly with a small hammer. This will normally loosen a stuck pin tumbler. Next step is to by freeze-spray and freeze only the key. This will make the key shrink a tiny bit.
Wiggle the key and latch to try and jar the pin tumblers loose. Brass is not brittle when cold but do not use enough power to break the key. I am assuming someone did not play a dirty prank and put super-glue inside the lock. Even so, oil, freezing and heating will make the key loosen up, even if it takes a few hours.
After trying all the great suggestions above and failing, I ended up calling a locksmith. He fixed it in 15 minutes by taking the lock apart. As it turned out, one of the pins in the 6-pin lock was tilted and not letting the barrel move. That was it. Hopefully, this answer will help someone else in a similar situation
There are several possibilities.
One, that everyone else has been pursuing, is that the lock cylinder itself is binding. If so, lubrication and/or vibration may help loosen it.
If you think it might have been super glued, you can try acetone, which dissolves cyanoacrylate glues -- but it may also dissolve the finish on the lock, and on the door, and on anything else it drips on. Personally I'd consider replacing the cylinder in that case.
Which brings us to the other possibile approach: Open the door from inside, and disassemble/dismount the lock far enough to remove the cylinder. If it turns freely by itself, the latch mechanism was jammed; check that the latch is engaging the strike without side pressure and is operating smoothly. If the cylinder still doesn't turn, you can get a replacement and worry about unsticking this one later, and/or bring the cylinder to a locksmith for assistance. Much cheaper than asking the locksmith to come to you, much easier than bringing her the whole door...
Graphite lube is better than WD-40 for locks... try a product called lock-ease. Use a rubber mallet and whack it hard many times while turning and jiggling the key. Don't hit the key, when hammering. Keep turning-pressure on the key while hammering and jiggling.
You can use WD-40 in a pinch, if you don't have graphite, but you should then use copious amount of lock-ease to rinse out the oil or take the lock off the door out and rinse it with a solvent like acetone whithin a few months. Use graphite for lubricating locks, not oil or products like WD-40 which will collect dust and eventually dry, leaving a gummed up lock.
You should also get a new key cut, because the primary reason for keys getting stuck is that they have been worn down too low. Keys are basically "digital". So a new key should fit better.
Edit: If you have powdered graphite you may need to suspend it in isopropyl alcohol. A 5%-10% solution (by weight) should work, but measuring could be an issue, so another way to do this is to put some graphite in a baggie, and then add 90% isopropyl alcohol to it. Use as little alcohol as possible to make a suspension. The suspension should be runny enough to be sucked up with a dropper.
Where to apply lubricant: