Table of Contents (click to expand)
A magnetic stripe stores information in millions of tiny iron-based particles whose magnetic polarity is aligned in a specific sequence by an electromagnet (a solenoid). When the card is swiped, the moving stripe induces a voltage in the reader head, and the resulting signal is decoded into account numbers, expiry dates or door codes. Low-coercivity hotel key cards can be wiped by even weak magnets, while high-coercivity bank cards are far more resistant.
If you travel frequently, you may have faced a specific problem with key cards for hotel rooms: sometimes, when you swipe the card to open your room’s door, it just doesn’t work. A little perplexed, you try swiping it a few more times, but every time the light blinks red and you remain stranded outside your room.

You then head to the reception and convey your concerns to the staff. With an ‘I totally know why your card is not working’ smile on their face, they ask, “Did you put your smartphone or camera next to the keycard?” You sheepishly nod, the staff member takes the card from you, punches a few keys on the computer and returns it to you. You try the same key card again, and this time, it works!
So, what’s going on here? Why does putting a smartphone/camera next to the keycard upset its ability to open a door?
Before discussing this answer, let’s first take a quick look at how a magnetic stripe card works.
What Is A Magnetic Stripe Card?
A magnetic stripe card, also referred to as a swipe card or magstripe, is a plastic card with a magnetic strip attached on its surface. This stripe is made of tiny iron-based components whose magnetism can be modified and can therefore be used to store information. A magstripe is quite similar to a magnetic recording tape, which you might find in a videotape or a music cassette.

Magnetic stripe cards are widely used in hotel key cards to provide room access and credit/debit cards to handle purchases. They are also commonly used as identity cards for entrance to corporate premises and college campuses for a variety of purposes.
How A Magnetic Stripe Card Works?
The magnetic strip on a card can be ‘written’ or encoded with information because the tiny iron-based particles that make up the strip can be magnetized in different directions by a device that produces a strong magnetic field. This device is a ‘solenoid’, which is basically a coil wound into a tightly packed helix.

The wire is wound around a high-permeability, metallic core that produces a strong magnetic field when a current is passed through it. This device encodes the required information onto the stripe, which is then pasted on a plastic card.
How Does A Magnetic Stripe Reader Work?
When a card with a magnetic strip is moved back and forth over the ‘reader head’, a voltage is induced in the coils of the card reader device.

This voltage can be amplified and recorded electronically, which is finally read by a computer (or a processor installed within the reader) to authenticate a user (in the case of identity cards) or a transaction (in the case of credit/debit cards).
Demagnetizing A Magstripe: Why Are Hotel Key Cards Erased When Placed Next To Cellphones?
Access key cards for hotel rooms are often erased if placed next to a cell phone. However, thankfully enough, the same is not true for credit cards or any other bank transaction cards, and there’s a good reason behind that.
You see, magnetic strips are classified on the basis of their coercivity, which is basically a measure of their ability to withstand an external magnetic field. There are high-coercivity or HiCo cards, which are encoded and can withstand the presence of a very strong magnetic field (to the order of 4000 Oersted), and there are low-coercivity or LoCo cards, which are encoded with a low-intensity magnetic field (~300 Oe).

As you can imagine, LoCo cards are more suited for short-term applications, such as temporary access to hotel rooms. Such room key cards must be encoded/erased very frequently; therefore, cost-saving is very important for such businesses. LoCo cards are easy to manufacture and require only a low-intensity magnetic field source to encode data on them.
On the flip side, they are easily erased by anything that produces a moderately strong magnetic field, not so much the smartphone itself (modern phone electronics are too weakly magnetic to wipe a card), but the small but powerful magnets tucked inside magnetic phone cases, wallet cases, MagSafe accessories, AirPods cases, and clip-on credit-card holders. A loudspeaker pressed close to a hotel key card can do it too. Bank credit cards, on the other hand, are HiCo cards. Quite predictably, they are expensive to manufacture, require a strong magnetic field to encode data on them, and are highly resistant to most magnets people generally come into contact with.
That’s why you can casually keep your credit card and smartphone together in your pocket, but doing the same with a hotel room key card and a magnetic phone case is a recipe for an awkward trip back to reception. (Apple itself warns that the MagSafe magnets in newer iPhones can, in some cases, damage even credit-card mag stripes; so if you carry a MagSafe-style case, keep your cards in a separate sleeve.)
It’s worth noting that the magnetic stripe itself is on the way out. Mastercard announced in 2021 that it will phase magnetic stripes off new payment cards in most regions by 2024, with a full global retirement by 2033, as EMV chips, contactless tap-to-pay and tokenised mobile wallets like Apple Pay and Google Pay take over. So the “swipe” that this article describes, and the demagnetisation problems that come with it, will likely feel like quaint history to your kids.
Do Magnets Actually Damage Your Credit Card?
This is the question that brings most people to this article, usually after someone insisted that keeping a card near a fridge magnet, a magnetic purse clasp or a phone would wipe it clean. So let us settle it: for a modern bank card, an ordinary magnet almost never does any harm at all.

The reason comes back to coercivity, that measure of how strong a field a stripe can shrug off before its tiny magnetic domains flip. The physicists at the University of Illinois make a useful point here: what matters is the strength of the field, far more than how long the card sits near it. A field weaker than the stripe’s coercivity can sit there all day and barely nudge the data, while a field stronger than it rewrites the domains almost at once. A high-coercivity credit card (around 4000 Oe) simply out-muscles the weak, smeared-out field of a decorative fridge magnet, and the electronics inside your phone are far too feebly magnetic to matter.
So what can erase a stripe? Small but ferociously strong neodymium magnets pressed right against it, the kind hidden inside magnetic phone cases, MagSafe accessories, clasp wallets and money clips. These are the same magnets salvaged from hard drives and loudspeakers, and held in direct contact they can scramble even a credit card, while making short work of a low-coercivity hotel or gift card. The other genuine threat is an MRI scanner: its magnet runs at roughly 1.5 to 3 tesla (15,000 to 30,000 gauss), thousands of times stronger than anything in your kitchen, which is exactly why imaging centers ask you to leave your wallet and any cards with magnetic strips outside the scan room.
One reassuring footnote: the gold EMV chip and the tap-to-pay antenna in your card store nothing magnetically at all, so no household magnet can corrupt them. It is only the brown or black stripe that is ever really at risk.
Why Did My Card’s Magnetic Stripe Stop Working?
Sometimes a stripe fails for a far more mundane reason than a rogue magnet: it has simply worn out. A magnetic stripe is essentially a strip of magnetic recording tape bonded to plastic, and like any recording medium it does not enjoy being dragged through a slot hundreds of times. Every swipe, along with the grit, sand and keys it shares your wallet with, abrades that thin film. Scuff or scratch the recorded pattern badly enough and the reader can no longer make sense of it.
You can usually tell the two failure modes apart. A card that has gone gradually temperamental, working on the third swipe, or only at certain terminals, or only when you slow down and swipe at just the right angle, is almost always physically worn. A card that worked perfectly yesterday and is stone dead today has more likely been demagnetized, its domains scrambled out of their neat sequence by a stray field so that the reader sees only gibberish.
What to do about it depends on the card. A hotel key or gift card that has been wiped holds no permanent data, so the front desk can simply re-encode it in seconds. A grubby stripe sometimes reads again after a gentle wipe with a soft, dry cloth. But a bank card with a genuinely worn or scratched stripe cannot be re-recorded by you; the fix is to fall back on the chip or tap-to-pay (which ignore the stripe entirely) and order a replacement.
References (click to expand)
- Explaining the Physics Behind Magstripes. Vassar College
- The Magnetic Stripe Technology. The University of Southern California
- Magnetic Strips | Physics Van | UIUC. The University of Illinois Urbana-Champaign
- D Ramsbrock. Magnetic Swipe Card System Security - UMD Computer Science. The University of Maryland, College Park
- Magnetic Stripe Damage | Physics Van | UIUC. The University of Illinois Urbana-Champaign
- Patient Safety: MR (MRI) Safety. RadiologyInfo.org (RSNA and ACR)













