SMS Spam Collection v. 1

The SMS Spam Collection v.1 is a public set of SMS labeled messages that have been collected for mobile phone spam research. It has one collection composed by 5,574 English, real and non-enconded messages, tagged according being legitimate (ham) or spam.


This corpus has been collected from free or free for research sources at the Internet:

The table below lists the provided dataset in different file formats, the amount of samples in each class and the total number of samples.

Application File format # Spam # Ham Total Link
General Plain text 747 4,827 5,574 Link 1
Weka ARFF 747 4,827 5,574 Link 2
Note: the messages are not in a chronological order.

You can find more useful information about the SMS Spam Collection v.1 at the following page of the UCI Repository.


The collection is composed by just one file, where each line has the correct class (ham or spam) followed by the raw message.

ham   What you doing?how are you?
ham   Ok lar... Joking wif u oni...
ham   dun say so early hor... U c already then say...
ham   MY NO. IN LUTON 0125698789 RING ME IF UR AROUND! H*
ham   Siva is in hostel aha:-.
ham   Cos i was out shopping wif darren jus now n i called him 2 ask wat present he wan lor. Then he started guessing who i was wif n he finally guessed darren lor.
spam  FreeMsg: Txt: CALL to No: 86888 & claim your reward of 3 hours talk time to use from your phone now! ubscribe6GBP/ mnth inc 3hrs 16 stop?txtStop
spam  Sunshine Quiz! Win a super Sony DVD recorder if you canname the capital of Australia? Text MQUIZ to 82277. B
spam  URGENT! Your Mobile No 07808726822 was awarded a L2,000 Bonus Caller Prize on 02/09/03! This is our 2nd attempt to contact YOU! Call 0871-872-9758 BOX95QU

We would appreciate:

  1. If you find this collection useful, make a reference to the paper below and the web page:
  2. Send us a message either to talmeida < AT >  or jmgomezh <AT> in case you make use of the corpus.

Publication and More Information

We offer a comprehensive study of this corpus in the following papers. These works present a number of interesting statistics, studies and baseline results for many traditional machine learning methods.

Almeida, T.A., Gómez Hidalgo, J.M., Yamakami, A. Contributions to the Study of SMS Spam Filtering: New Collection and Results.  Proceedings of the 2011 ACM Symposium on Document Engineering (DOCENG'11), Mountain View, CA, USA, 2011. [preprint]

Gómez Hidalgo, J.M., Almeida, T.A., Yamakami, A. On the Validity of a New SMS Spam Collection.  Proceedings of the 11th IEEE International Conference on Machine Learning and Applications (ICMLA'12), Boca Raton, FL, USA, 2012. [preprint]

Almeida, T.A., Gómez Hidalgo, J.M., Silva, T.P.  Towards SMS Spam Filtering: Results under a New Dataset.   International Journal of Information Security Science (IJISS), 2(1), 1-18, 2013. [Invited paper - full version]


The SMS Spam Collection has been created by Tiago A. Almeida and José María Gómez Hidalgo.

We would like to thank Min-Yen Kan and his team for making the NUS SMS Corpus available.

© Tiago A. Almeida and José María Gómez Hidalgo, 2011.