Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is anyone aware of good data anonymization software? Or perhaps a package for R that does data anonymization? Obviously not expecting uncrackable anonymization - just want to make it difficult.


locked by whuber Oct 30 '15 at 21:48

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

What is your data, and what do you want to do with the anonymized data? – Peter Smit Jul 27 '10 at 4:42

The Cornell Anonymization Tookit is open source. Their research page has links to associated publications.


Warning: beware that it can be very difficult to anonymize data in a way that prevents re-identification (de-anonymization), without losing much of the value of the data. This is not a situation where you can just throw a piece of software at it without thinking. Protecting people's anonymity requires careful thought. See, e.g., this paper for a more careful exposition of why this is not trivial.

An example of a cautionary story is the Netflix challenge, where a seemingly anonymized dataset was actually linked back to the identity of Netflix users -- or the release of anonymized AOL search records, many of which (researchers discovered) could still be tied back to individuals through more sophisticated analysis. Another example is from Massachusetts, where a health insurance commission released data on all state employees, after anonymizing it by removing names, addresses, SSNs, etc. However, a privacy researcher discovered that it was still possible to re-identify individuals, and as a demonstration, showed how to identify the governor's health records. She later showed, for example, that most people can be uniquely identified from just their ZIP code (or census tract), birth date, and gender. These were stories of people diligently anonymizing data; they thought they'd done a good job of anonymization, and just didn't realize how tricky this issue is. These cautionary stories should give you pause.

For these reasons, I discourage you from trying to anonymize your dataset on your own, if you have no prior experience in this area.

Important: the techniques needed to anonymize data will likely depend a lot on the sort of data you have and the application domain you are working in. Unfortunately, you didn't provide this information. As a result, it is almost impossible to provide you with good advice about how to anonymize your dataset.

I imagine it may be tempting to view this answer as unhelpful, because instead of saying "be happy, don't worry, just throw this magic piece of software at your data and you don't have to think", I am saying "wait, this is trickier than it appears on first glance, be careful". I realize this message might not be very popular, but I think this is a message folks need to hear.


Take a look at the sdcMicro package on CRAN. One of the authors wrote a paper describing beyond the included vignette as well.


One approach would be to use Bloom filters. Check SAFELINK project website for programs in Java and Python. Paper explaining method is here.

There is also an interesting approach to anaonymization of strings in the context of record linkage using n-grams developed by ANU Data Mining Group. The paper with description and sample Python code is available here.


Not the answer you're looking for? Browse other questions tagged or ask your own question.