Magnetic Strips: How Do Magnetic Strips On Credit Cards Work?

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.

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.

A room access key card

A room access key card

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 card

A typical magnetic stripe card

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.


A solenoid

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.

A card reader consists of a solenoid too – the same component that is used to write information in the magnetic strip. (Photo Credit : Flickr)

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 magnetic stripe card: 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).

Hotel room key cards are LiCo cards.

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, however, they are easily erased by things that produce a magnetic field, such as a cell phone, camera or even a piece of magnet.

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 (electronic devices are a type of magnet) that people generally come in contact with.

That’s why you can put your credit card and smartphone together in your pocket, but you can’t do the same with a room access key card!


  1. Vassar College
  2. Illumin University of Southern California
  3. VAN University of Illinois at Urbana-Champaign
  4. University of Maryland, College Park
The short URL of the present article is:
Help us make this article better
About the Author:

Ashish is a Science graduate (Bachelor of Science) from Punjabi University (India). He spends a lot of time watching movies, and an awful lot more time discussing them. He likes Harry Potter and the Avengers, and obsesses over how thoroughly Science dictates every aspect of life… in this universe, at least.

Science ABC YouTube Videos

  1. Photosynthesis: How Plants Make Their Food?
  2. How Does A Helicopter Work: Everything You Need To Know About Helicopters
  3. Rigor Mortis, Livor Mortis, Pallor Mortis, Algor Mortis: Forensic Science Explains Stages of Death
  4. Why Is Space Cold If There Are So Many Stars?
  5. Tensor Tympani Sound: Why Do You Hear A Rumbling Sound When You Close Your Eyes Too Hard?
  6. Hawking Radiation Explained: What Exactly Was Stephen Hawking Famous For?
  7. Current Vs Voltage: How Much Current Can Kill You?
  8. Coefficient Of Restitution: Why Certain Objects Are More Bouncy Than Others?