> ## Documentation Index
> Fetch the complete documentation index at: https://villagesql.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# vsql_address_standardizer extension for MySQL

> The vsql_address_standardizer community extension parses freeform US postal addresses in MySQL into house number, street, unit, city, state, and ZIP.

A US postal address arrives as one line of freeform text, and almost every use
of it needs the parts: the house number, the street, the unit, the city, the
state, the ZIP. `vsql_address_standardizer` splits that line apart in SQL and
normalizes what it finds, so `north` becomes `N` and `new york` becomes `NY`.
It was inspired by PostgreSQL's `address_standardizer` contrib module.

| | |
| - | - |
| **Maintainer** | [Japheth Obala](https://github.com/jobala) |
| **Source and documentation** | [jobala/vsql-address-standardizer](https://github.com/jobala/vsql-address-standardizer) |
| **License** | GPL-2.0 |

> [!NOTE]
>
> A third party writes and maintains this extension. VillageSQL does not build,
> test, or ship it, and the description below follows the maintainer's own
> documentation. Read that documentation before you rely on it.

## Install

Build it from the repository against a VillageSQL build tree (`VillageSQL_BUILD_DIR`), copy the `.veb` file into the server's `veb_dir`, then install it:

```sql theme={null}
INSTALL EXTENSION vsql_address_standardizer;
```

## What it adds

| Function | Returns | What it does |
| - | - | - |
| `address_standardize(address)` | text | The whole address, normalized and rewritten on one line |
| `address_parse_json(address)` | text | The parts as a JSON object. `house_number`, `street_name`, `street_suffix`, `city`, `state`, and `zip` are always present; `pre_directional`, `post_directional`, `unit_designator`, and `unit_identifier` appear when the address has them |
| `address_field(address, name)` | text | One named part on its own |

It handles US addresses only.

## See also

* [Available extensions](https://villagesql.com/docs/mysql-8.4/0.0.6/extensions.md) — the full catalog
* [jobala/vsql-address-standardizer](https://github.com/jobala/vsql-address-standardizer) — source, examples, and the known limitations


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.