What is data cleansing? It is the process of detecting and correcting errors, inconsistencies, duplicates and gaps in data so that it is accurate, complete, consistent and fit for its purpose. Also called data cleaning or data scrubbing, it covers tasks such as standardising formats, correcting typos, removing duplicate records, filling or flagging missing values, validating against rules and reconciling conflicting sources. Poor data quality costs organisations time, money and trust, because analytics, machine learning, marketing and operations all inherit the errors. This guide explains the types of data problems, the cleansing process step by step, techniques and tools, how to prevent dirty data from entering in the first place and how to measure improvement.
Short answer: Data cleansing finds and fixes quality problems such as duplicates, invalid values, inconsistent formats and missing data, using profiling, rules, matching and standardisation. Lasting results need prevention at the source and ongoing monitoring, not just a one time clean up.
What is data cleansing?
The data cleansing article on Wikipedia describes the process of detecting and correcting corrupt or inaccurate records. It is a practical part of data quality management and appears in every ETL and data pipeline. It matters for master data management, CRM data migration and machine learning, where bad inputs produce bad outputs.
Common data quality problems

| Problem | Example | Typical fix |
|---|---|---|
| Duplicates | The same customer entered twice with slight differences | Matching and merging with survivorship rules |
| Inconsistent formats | Dates as 03/04/26 and 2026-04-03, phone numbers with varied punctuation | Standardise to one format |
| Invalid values | Age of 250, email without an at sign | Validation rules and correction or rejection |
| Missing values | Blank country, no postal code | Fill from reliable sources, default or flag |
| Typos and spelling variants | Londn, Lndon, London | Reference lists and fuzzy matching |
| Outdated data | Old addresses, former employers | Refresh through enrichment and verification |
| Conflicting sources | Two systems disagree on a customer status | Define a system of record and rules |
| Outliers and errors | A price recorded as 1000 times too high | Statistical checks and review |
The data cleansing process
- Define quality requirements. Decide what accurate, complete and consistent mean for each important field and use case.
- Profile the data. Measure completeness, uniqueness, patterns, ranges and distributions to see the real problems.
- Design cleansing rules. Write rules for formats, valid values, reference lists, defaults and matching logic.
- Standardise and correct. Apply transformations to fix formats, case, spelling and codes.
- Deduplicate and merge. Identify matching records, decide survivors and merge carefully, keeping an audit trail.
- Validate the results. Re-profile, compare before and after, and sample records with business users.
- Monitor and prevent. Add checks to pipelines and capture points, so errors are caught early. See what is data observability.
Techniques used in data cleansing
| Technique | What it does | Example |
|---|---|---|
| Parsing | Splits fields into components | Separate a full address into street, city and postcode |
| Standardisation | Applies a consistent format or code | Convert country names to ISO codes |
| Validation | Checks values against rules or reference data | Verify a postcode matches the city |
| Deduplication and record matching | Finds records for the same entity | Fuzzy match names and addresses |
| Imputation | Estimates missing values | Fill a missing value with a median or a model prediction |
| Enrichment | Adds missing information from trusted sources. See what is data enrichment | Append industry and company size |
| Outlier handling | Detects and reviews extreme values | Flag unrealistic transaction amounts |
Cleansing tools
| Category | Examples | Best for |
|---|---|---|
| Spreadsheets and scripts | Excel, Python with pandas, SQL | Small or exploratory work |
| Data preparation tools | OpenRefine, Trifacta style tools | Interactive cleaning by analysts |
| Data quality platforms | Informatica, Talend, Ataccama, Great Expectations | Rules, monitoring and scale |
| Transformation frameworks | dbt tests and models. See what is dbt | Cleansing inside the warehouse pipeline |
| Address and identity verification services | Postal and verification APIs | Contact data accuracy |
| MDM platforms | Master data tools | Entity matching and golden records |
Prevention: stop dirty data at the source
- Use validation and drop down lists in forms and applications.
- Standardise reference data and codes across systems.
- Apply data contracts between producers and consumers.
- Check data at ingestion and reject or quarantine bad records.
- Give data owners responsibility and visible quality scores.
- Train staff on why accurate entry matters and give feedback on errors.
Common data cleansing mistakes
- Cleaning once and never again, so data decays.
- Overwriting source data without keeping the original or an audit trail.
- Merging records too aggressively and combining different people.
- Using imputation that hides real gaps or biases analysis.
- Fixing symptoms in reports instead of correcting data at the source.
- No measurement, so nobody knows whether quality improved.
Our data governance service builds the rules and ownership for quality, our data analytics service automates cleansing in pipelines and our CRM implementation service cleans data before it enters your CRM.
A worked example: cleaning a customer database
A subscription business has 1.2 million customer records and a marketing team that suspects wasted spend and poor deliverability. Profiling reveals that 14 percent of emails fail validation, 9 percent of records are duplicates and a quarter have inconsistent country values. The data team builds rules to standardise countries and phone formats, validate emails and match records on a combination of email, name and postcode, with human review for uncertain matches.
After merging duplicates with survivorship rules that keep the most recent verified value, the database falls to 1.05 million records. The team adds validation to the signup form, nightly quality checks and a dashboard of completeness and duplication. Email bounce rates drop, campaigns reach more real customers and the cost per lead falls. Because source forms were fixed, quality scores hold steady over the following year rather than sliding back.
Measuring data quality improvement
Choose a small set of measures tied to business use. Typical dimensions are completeness, validity, uniqueness, consistency, timeliness and accuracy. Report them by domain, track trends monthly and set targets that the data owners agree to. Show the impact in business terms, such as lower bounce rates, fewer failed deliveries, faster month end close or improved model accuracy, so that leaders continue to fund the work. Remember that a score only has meaning if it is calculated the same way over time, so document the rules.
Cleansing for analytics and machine learning
Analytics and machine learning have different tolerance for dirty data. A dashboard may handle a few missing values with a note, while a model can be thrown off by inconsistent units or leakage from future information. For machine learning, cleansing must be repeatable, so that the same steps are applied in training and in production, and it must be documented, so that changes in data handling can be traced. Keep raw, cleaned and feature layers separate in your pipeline, and version the cleaning code alongside the model.
Be careful with automatic outlier removal. Extreme values are sometimes errors and sometimes the most important events, such as fraud or equipment failure. Review them with subject matter experts, and record the reasoning for each rule. Finally, test the effect of cleansing on results. If a model or report changes materially after a rule is applied, make sure stakeholders understand why and agree that the change reflects reality.
Key takeaways
- Data cleansing detects and corrects errors, duplicates, inconsistencies and gaps in data.
- Profiling, rules, standardisation, matching and validation are the main steps.
- Keep audit trails and avoid destroying source data.
- Prevent dirty data through validation, contracts and ownership.
- Monitor quality continuously and measure business impact.
Quick glossary
| Term | Meaning |
|---|---|
| Data profiling | Analysing data to understand its quality |
| Standardisation | Converting values to a consistent format |
| Deduplication | Identifying and merging duplicate records |
| Survivorship | Rules for choosing which value to keep when merging |
| Imputation | Estimating missing values |
Read next: BigQuery vs Snowflake: Which Cloud Data Platform? · BigQuery Streaming Inserts: Real-Time Ingestion Guide · BigQuery Access Control: IAM, Policy Tags and Row Security
Frequently asked questions
What is data cleansing in simple terms?
It is finding and fixing mistakes in data, such as duplicates, wrong formats, typos and missing values, so that the data can be trusted and used.
What is the difference between data cleansing and data validation?
Validation checks whether data meets rules. Cleansing goes further by correcting or removing the problems that validation finds.
How do you clean data?
Profile it, define rules, standardise formats, correct errors, deduplicate, validate the results and then monitor and prevent new problems.
What is data deduplication?
It is identifying records that refer to the same real world entity, such as a customer, and merging them into one trusted record.
Should missing values be filled in?
It depends. If a reliable source exists, fill them. Otherwise flag or leave them missing, because poor guesses can bias analysis.
How often should data be cleansed?
Continuously, through automated checks in pipelines and at data entry, with periodic deeper reviews. A one off clean up decays quickly.
What tools can I use?
Options range from spreadsheets and SQL to data preparation tools, data quality platforms and transformation frameworks such as dbt.
How do I prove cleansing worked?
Compare quality metrics before and after, sample records with business users and track business outcomes such as bounce rates, errors and reporting disputes.
