Picture of Arduino magnetic stripe decoder
This instructable shows how to use some freely available code, an arduino, and a standard magnetic stripe reader to scan and display the data stored on magnetic stripe cards such as credit cards, student IDs, etc.

I was inspired to post this after reading the intro to magnetic stripe reading and Stripe Snoop that is found in MAKE magazine Volume 1. That tutorial details how to interface a stripe reader to a game port interface, but I have a mac laptop, so I don't have a game port interface!

Also, I think that the arduino suite of hardware/software is much more integrated and easy to understand for beginners than the "traditional" approach presented on the Stripe Snoop website and MAKE magazine.

However, this application simply shows the data that's on a magnetic stripe; it does not have any of the more advanced features that Stripe Snoop does.

The last step of this instructable has some links to more in-depth information about this topic for those who are interested.
Remove these adsRemove these ads by Signing Up

Step 1: Hardware

Picture of Hardware
Obviously, you first must obtain a magnetic stripe reader. I'm using an Omron V3A-4K that I ordered from digikey. It cost me $20.00 or so. If you can't find one of these, any standard TTL reader will do.

Don't worry about buying one of the fancy harnesses that they sell. There are breakout pads on the circuit board inside of the reader. Once you have received your reader, pop off the side cover, and solder wires to the pads as shown in the picture. Of course, if you have a different reader, the wiring will probably be different. In this case, consult your reader's datasheet to locate the necessary pads.

Next, connect the wires to the Arduino's digital pins as follows:

DATA - 2
CLK - 3
LOAD - 5

Finally, connect the +5v and GND to their respective terminals on the Arduino board.

Step 2: Software

Step 3: Use it!

Finally, simply open the serial connection in the arduino applet, and start swiping cards! The decoded data from the card will appear in the window as soon as you swipe one.
1-40 of 57Next »
bsechini3 months ago

Where is the code?

I'm trying but nothing works. Can someone help-me, Im trying to use a CIS LCM-040 module


jwells53 years ago
well the .PDE file loaded to my board and i see it was rapidly blinking and then it said uploadiing done..... but it didnt read the card reader... not sure what's up with this.
boelle11 jwells57 months ago

what PDE ?

styles20124 years ago
does anyone have the schematic and code for this project? Thanks any help appreciated.
heres coding

heres plans let me know how it turns out.

(where its says cover... change to page 106 if not set to 106
boelle11 jwells57 months ago

got a 404 on that link?

murdocjr7 months ago

Good night ..

eae guys, someone has the source code that uses eel? because I searched and found it here in sete..quem have put ae ..

goiano1 year ago
goodnight my name and Paul teclo of Brazil, people seek out the parents or friends to assist me in this work there with projects or even to experience here in Brazil terminals electronics yet most are magnetic taja like to know if you or someone read this material there is some way to try it lar and logical to get some profit out of it, I do what has to be done here in Brazil and send your part if you are interested send me an e-mail or you or someone who has interest.

murdocjr goiano7 months ago

me add

whatsshap (63)92392003

dudesurge3 years ago
if you already have a magnetic strip reader why would you need to use other hardware with it?
Magnetic stripe readers aren't independent devices, they always connect to a system of some kind to actually use the data, like a Point Of Sale system or security system. Just a mag stripe reader doesn't do anything. Plus this is really just a launching point for many other options, he is just showing how to read mag stripes using an Arduino
kgee3 years ago
im getting different results. when i click monitor serial port it shows numbers and symbols. but now what you have, which version of the arduino do you have? the program that is. im using 22
aselker kgee2 years ago
What baud rate are you using?
imhotep6253 years ago
i have a tranz 330 terminal i want to retrieve the track two information on HELP! : )
njakol6 years ago
Really nice Instructable! I think you could feed the raw data you get from your reader to stripesnoop, look at this : He has built an usb stripe reader and writes:

"This adapter converts electrical signals from a TTL magnetic stripe reader into 1's and 0's that are "typed" on the USB keyboard device that the adapter registers when it is plugged into a computer. This string of 1's and 0's can be fed into Stripe Snoop using ss -i or saved to disk for later analysis"

So you should be able to do something like that.

Yes, I read little in the docs that come with stripesnoop, it has "input mode" where you can take any bitstream as input (via stdin) so just do
yourbitstream | ss -i, in linux at least. Maybe you have to convert it to binary first, I don't know.

I have to try this myself soon, the problem is that the stripe-reader I have is of some unknown model and I don't know which of the cables is for what, but it is 5 of them so I think I should be able to use it, if I only find out which ones are the right ones. Does anybody have any ideas on how to find out?
romisto njakol3 years ago
It's possible to have the raw data by Arduino ??

Give me the .pde File please. i want to have data as this :

Stripe_Data: 0001101001010111010101111100000
Stripe_Data: 111100011000100
lrinetti3 years ago
It's possible to add an LCD display to read the data on the track/s os the card ?
jwells53 years ago
i did this and it didn't what yours did, it only said upload finished and my board was flashing when it was uploading the coding..... also to @amaze... im not sure if this user is answring anymore.... been waiting atleast anyone with insite.
maxell37754 years ago
Good Morning, Is there a way to get the data come straight from a usb port?, instead of having is to come from a audio source, that you could connect the spoofer to a USB port and send the data, and if it is not possible with this king of design, is there a USB SWIPE CARD like Justin longs in DIe Hard 4? when he tries to bypass woodlands server room door.

THank you
Goosen4 years ago
Can you make a instrucable on how to make a writer?
eatmoreart6 years ago
This is wicked awesome, and I am going to make one of my very own. One question - does the software support all three tracks on a card, or just one? Digikey says the card reader is Track 2 only - what if you had one that was 1, 2, & 3 track?
This particular reader is actually pretty easy to modify into a workable multi-track reader. It's not pretty, but it works.
powerpants (author)  eatmoreart6 years ago
no, it's only track 2....
rada1945 years ago
is there any way to download stuff on to it once you swipe it.
like if you swipe a boomers card can you put points on to it.
 The magnetic strip usually only stores an ID code of the card itself... The amount of points is stored at the store itself and when the card is swiped, they know which account they have to access from their own data. That's how it works afaik. Writing to the card to increase the amount of points is not possible, i think. Altering the code to access somebody else's account is theoretically possible although it's hard to pick a good ID. If, for example, the store has 100 customers, the code would probably still allow for millions of different combinations, rendering most of them useless anyway.
How about for a vending machine card?

They have no data storage system accesible to every machine.

Could you, in theory, use this to 'credit' your vending card?
Yes this can be done. In fact it also works for other types of cards like those used at laundromats for example. Basically any card where the data is stored locally on the card and not in a database.  Use caution when changing data on cards as some systems use both locally and remotely stored info and a difference can set off red flags. Any card which is not traceable back to you personally mod away I say.  Thats what the Doctor would do.
in theory, i think so xD *evil grin*... ... ...
evix rada1945 years ago
Yeah, any info on this?

Great question...
sampd_5 years ago
Great tutorial! Has anyone tried using this with an XBEE shield? Am having issues regarding which pins to use for the mag stripe reader (as the shield uses 0-7)
try to find a pinout PDF of the reader, they are usually available through either the guys that make them or the ones that sell them
sandman885 years ago
Is it possible to store the data from the magnetic card on the Arduino's flashmemory? And get the information out of the flashmemory in a later stadium??

Thanks in advance,

a student from the Netherlands
y4m45 years ago
I did this and it works nicely. I used the Panasonic reader that only costs $3.50 from All Electronics. Check out my site below for details.
grk5 years ago
nice article, but how to write back data to the card? thank you!
netstat6 years ago
Why in the diagram your are using data, clock and load But in the code theres only Data and Load
lacabra netstat5 years ago
each of the two functions attachInterrupt operate on pins 2 & 3 (see to read Data using Clock to sync. Thus, it uses all three lines.
amaze5 years ago
I have a usb mag reader. do you know any apps take can take the raw data out my cards?
akatsuki6666 years ago
finaly a code with no errors
very true!
akatsuki6666 years ago
scrach that when i put in the code from the "here" button off step 2 it works (wooot)
1-40 of 57Next »