```yaml
product: AlterLab
title: "Data Normalization — Web Scraping Glossary | AlterLab"
comparison_context: "AlterLab is an alternative to Firecrawl, ScrapingBee, and Bright Data."
source_url: https://alterlab.io/glossary/normalization
```

extraction

# Data Normalization

Data normalization standardises scraped values into a consistent format — stripping currency symbols, trimming whitespace, converting dates, and unifying units.

Raw scraped text is inconsistent: prices appear as `$1,299.00`, `1299`, `USD 1,299`, or `1.299,00` depending on locale. Dates appear as `June 25, 2026`, `2026-06-25`, `25/06/26`, or relative strings like `2 hours ago`. Normalization converts these varied representations into a canonical form — a float for the price, an ISO 8601 string for the date — so that records can be compared, sorted, and aggregated.

Normalization steps typically include: stripping whitespace and control characters, removing HTML entities, converting character encodings to UTF-8, parsing numbers by removing thousands separators and detecting locale-specific decimal notation, parsing dates with libraries like dateparser that handle multiple formats, and resolving relative URLs to absolute.

Normalizing data at the extract-transform boundary (rather than leaving it to downstream consumers) simplifies downstream logic and ensures that any anomaly — an unexpected format that the normaliser cannot parse — is surfaced immediately rather than silently producing wrong values.

### What is Data Normalization?

Data normalization standardises scraped values into a consistent format — stripping currency symbols, trimming whitespace, converting dates, and unifying units.

### How does AlterLab handle Data Normalization?

Normalizing data at the extract-transform boundary (rather than leaving it to downstream consumers) simplifies downstream logic and ensures that any anomaly — an unexpected format that the normaliser cannot parse — is surfaced immediately rather than silently producing wrong values.

## Examples

```
import re
from dateparser import parse as parse_date

def normalize_price(raw: str) -> float:
    cleaned = re.sub(r"[^\d.,]", "", raw)
    # Handle European decimal comma
    if cleaned.count(",") == 1 and cleaned.count(".") == 0:
        cleaned = cleaned.replace(",", ".")
    return float(cleaned.replace(",", ""))

def normalize_date(raw: str) -> str:
    dt = parse_date(raw)
    return dt.date().isoformat() if dt else raw
```

## Related Terms

[Schema ValidationSchema validation checks that extracted data conforms to an expected structure and type constraints before it is written to a database or downstream system.](https://alterlab.io/glossary/schema-validation)[Data PipelineA data pipeline is an automated sequence of steps that ingests raw data from a source, transforms it, and delivers it to a destination such as a database, data warehouse, or analytics system.](https://alterlab.io/glossary/data-pipeline)[ETL (Extract, Transform, Load)ETL is a data integration pattern where raw data is Extracted from a source, Transformed into the desired format, and Loaded into a destination system.](https://alterlab.io/glossary/etl)[Structured Data ExtractionConverting free-form HTML into typed JSON records using explicit schemas, producing clean structured output instead of raw markup.](https://alterlab.io/glossary/structured-data-extraction)[DeduplicationDeduplication is the process of identifying and removing or merging duplicate records in a scraped dataset, ensuring each real-world entity appears exactly once.](https://alterlab.io/glossary/deduplication)

## Extract Data Normalization data from any website

AlterLab returns clean, structured data from any public URL — no scraper infrastructure needed. Start free, no credit card required.

[View API docs](https://alterlab.io/docs/api/rest)

[Back to Glossary](https://alterlab.io/glossary)