Address Verification

What Is Address Parsing

By 27 August 2023April 15th, 2024No Comments
patient address verification

Street and Postal Address Parsing- How it Works?

Are you a developer or Working on a project with location-related requirements? If yes, you should perform address parsing from strings, standardizing, and more. 

But wait…what is address parsing?

what is a non standard address

Addresses are entered as strings when users enter them. The components, such as the house address, street, city, and state, must be divided into categories before checking if it is correct… A test is then conducted to verify (or not) every piece of the address.

Address Parsing is a crucial aspect of completing any developing job successfully. To learn more about address parsing, its mechanism, and the best address parser for your project, keep reading. 

What is Address Parsing?

When you use the phrase Address Parsing or Address Parsing API, you are referring to the process of breaking down a string of text into separate address elements.  Let us parse the following address for you: 

1 A Queen St Apt 4 York PA 17404-1442

Although there are many others, here is one method of address parsing structures,

House 1 (One)
Road A Queen 
Suffix  St
Unit 4 (Four)
City York
Postcode 17404-1442
State Pennsylvania
Country USA

As you can see above, the address is parsed or broken down into the required or right data sets. 

Why is Address Parsing Difficult for the Developers?

Everything starts with the method you use to write down an address. There are various ways to enter mailing addresses, and different programs handle it differently. And let us not forget about the countries and their postal standards. This is why regular expressions, the simplest solution, usually do not work. 


Below are examples of different types of address formats:


Monsieur Aisha-Pierre Rochefort

102, Boulevard Saint-Jean.

Montréal (Québec)  QC H9S 4Z1, CA


Jeremy Brown Martinson, Jr.

1 A Queen St Apt 4 York PA 17404-1442


Ms Anne Williams

Finance and Accounting

Australia Post

2 Cavill Avenue 

Surfers Paradise QLD 4217, Australia


Mr Alex Smith

3B High Street

Hedge End


SO31 4NN

To overcome such obstacles, many companies opted out of using expensive and unique technologies like address parsers. However, there are persuasive techniques that can be used for smaller projects.

Why is Address Parsing a One-Step in the Process?

Address Parsing is not a single-step process. However, it is beneficial when talking about addressing verification and its outcomes! The steps start with the following:

  • The user enters the address and initiates data capturing. 
  • This includes parsing, and the address is broken down into several components.
  • Corrected spelling, abbreviation, and casing are applied to the parsed address components.
  • The address data we return is beautifully parsed along with your standard address.

Uses of Address Parser

While parsed address data may be a fraction within the address verification and geocoding process, the information has many uses. Address parsing enables:

  • Better address matching across datasets
  • The creation of persistent unique identifiers
  • More precise location data analysis
    • How many customer addresses in a city have secondary addresses, such as apartments, suites, or subunits? It is easier to use more accurate information.
    • Takes unstructured data and converts that information into usable information.
  • Better address management as well as better address storage.
  • Address parsing allows for normalization or standardization.
  • It can be used for the de-duplication of redundant addresses within a system.
  • As mentioned above, the address parser helps store address information in several components. Businesses can store parsed addresses rather than saving the actual address string.

What are the Typical Approaches for a Successful Address Parsing?

As a developer, we know that you might be worried about address parsing, normalizing, and standardizing real-time addresses. And…. we also know that the first thing that comes to your mind is regular expressions! This can further lead to the Dunning-Kruger Effect. In such a case, you have overestimated what you are capable of, especially compared to others that are competent.

A Dunning-Kruger effect is common, but addresses do not follow a regular pattern. The thousands of edge cases found in address data will be missed by any regular expression, regardless of the complexity.

Street addresses vary in format from one area to another. A regular expression may also fail when parsing them in the next town over, even if you have solved most edge cases. 

As far as address parsing is concerned, there are two approaches you can follow.

  1. Your user or customer should provide the address as a component with separate fields for each value. The user will parse it for you, so you won't have to. In my opinion, creating more consistent address data doesn't provide the most optimal user experience.
  2. Addresses should be entered in a freeform style, which means the full address should be on one line.

Due to the lack of uniform entry control for address strings, there is a much higher possibility of differences between different addresses. An apartment number may be entered first by one user and after the street by another. Address parsing is done on various levels based on your requirements and details. 

Can Address Parsing Help Update Your Database and Ship Mailers?

Performing more than address parsing would be best to maintain an accurate and complete database. Also, it is advisable to use end-to-end address verification services to ensure you mail items to the correct destinations.

But why is address parsing not enough?

The answer lies in the meaning of address parsing! As discussed above, it refers to breaking down addresses into different components, like the street name, city, state, and ZIP code.

Though disassembling addresses can help you ensure you have all the necessary details, it does not guarantee validity and deliverability.

Hence, you need further steps, like standardization and verification.

Address Autocomplete

Autocomplete involves predicting your customers’ delivery addresses as they start typing their details. For instance, imagine they enter- 50 Jane ST……….

The autocomplete feature shows them a list of suggestions, helping them choose the correct address and saving them the trouble and time of typing everything.

Incorporating address autocomplete lets you improve your website’s user experience (UX). Thus, you can impress your customers with this technology and enable them to complete their checkout forms faster and hassle-free.

Also, add this functionality by integrating our address verification API into your CRM. It allows your sales, marketing, finance, and other teams to enter accurate customer details into your system, ensuring your database is up-to-date and valid.


USPS requires you to reformat your customers’ delivery addresses according to the postal guidelines. It helps all individuals and companies follow a standard format, letting the Post Office staff maintain consistency and fast operations.

The postal mail sorting equipment reads all mailing addresses from the bottom up. Thus, it reads the ZIP code first, following other elements.

Using incorrect address formats can result in delays, mail returns, and lost items. 

The postal workers would need to hand-sort the items most times, leading to surcharges.

Hence, using the correct format is the best way to mail on time and accurately at affordable rates.

Standardization allows you to change the structure of your mailing lists from

Pasadena California NW 4 1st ST 90101


4 NW 1st ST 

Pasadena CA 90101

See the difference?

Sadly, many customers enter their addresses this way and even skip some details.

Standardizing your addresses before printing your labels or shipping mailers can be a lifesaver for your business. You can prevent spending on reimbursing customers and reshipping.

Also, it can protect your brand’s reputation by letting you send customer orders and other mailers to the correct people the first time.

Address Validation

Address validation helps you cross-check your mailing lists against the USPS-authorized database. It allows you to mail to CASS-verified addresses, increasing your deliverability ratios.

If we find a match for your address in the USPS database, we check whether it is correct. Otherwise, our solutions can make the necessary corrections or modifications.

If our API does not find a match, it marks the address invalid, meaning the address is fake or non-existent.

PostGrid’s address verification services can simultaneously perform autocomplete, parsing, standardization, and validation. Hence, you don’t need to pay for every service individually or waste time processing your mailing lists for every task.

NPM Method for Address Parsing

Standardizing and Address Parsing API can also be done with NPM packages. There are usually certain formats or countries that specify them. The following examples illustrate the use of NPM libraries:

  • parse-address-string: An address parser tends to target countries including US and Canada. 
  • australia-address-parser – npm: It performs in-depth analysis and parsing of Australian addresses. 
  • uk-clear-addressing – npm: An address parser tends to work for UK street addresses to get the house number, city, state, and more. 

Libpostal — A NLP-Trained Address Parser Using Open Data

Mapzen developed Libpostal to initiate international address parsing using a lightweight C library. Machine learning distinguishes the Libpostal from other address parsers, as it is trained using millions of real-world addresses.

You can use the library directly or through bindings. Tech stacks like Python, Go, Java, NodeJS, and Ruby bindings are available for you as a developer. The Libpostal is released under the MIT license and is open source.

The Pros:

  • It is smart, practical, and effective.
  • Libpostal initiates address parsing based on location strings. Also, it understands expressions such as “restaurants, nearby, and in.
  • It is an open-source solution that comes with a permissive license.

The cons:

  • It is necessary to install and support the C library.
  • A trained data model for Libpostal must store in memory, so the application consumes about 4GB of space.

Online Validation or Address Parsing APIs

Verification of street addresses and postal addresses is known as address validation. There are 2 ways to verify an address: upfront, by searching for a piece of incorrect or incomplete information, or by address parsing, matching formatting, and cleansing information from a database against the authorized postal data.

There are, however, differences between address parsing and related services. A database will often be matched using rules approaches by address verification services. An address 1 to 150 is the start and end of Main Street in zip 98765, according to service.  Based on logic, 987 Main St is a valid residential address, but may or may not be verified for delivery.

Latitude and longitude can also be provided as part of address parsing in some services. In many of these systems, latitude, and longitude are computed by logically splicing addresses in a block. Using lat/long for verified delivery is problematic for retailers, restaurants, and delivery companies. Using approximate data, a driver may not be able to locate you halfway down the block.

Data Capturing- For Optimal Address Parsing

At PostGrid, we work with many printers and delivery service providers for our clients. There are times when customers enter their address-related information on the official websites to initiate the delivery processes daily. And every day, hundreds of addresses are marked undeliverable- that must be corrected within the system. It is a waste of time provided that many address-parsing APIs or solutions can handle it efficiently.

Our team is optimizing the system APIs to standardize. Verify, and address parsing during entry. You can ensure the cleanliness of your data by doing that. Have the consumer agree to the correct delivery address on entry by presenting a standardized, verified address.

However, there are a few standards that you would like to see that PostGrid use:

  • CASS Certification (For US): A software application that corrects and matches street addresses is evaluated by the Coding Accuracy Support System (CASS). A CASS certification is available for all mail items, service providers, and third-party vendors who want to improve the accuracy of their five-digit coding, ZIP+4, carrier routes, and address-matching software.
  • SERP Certification (For Canada): A postal certification is issued by Canada Post under its Software Evaluation and Recognition Program. You can test whether or not your mailing addresses are valid and that they are correct with SERP certification. 

You might find this online parser and address validator tool useful if address parsing isn't a daily need for your project. A PostGrid API for parsing addresses looks like this:

  1. Simply copy and paste the addresses in the text field, or upload a CSV, Excel, or Text file.
  2. The verification results can then be downloaded by tapping “Verify”.
  3. The addresses will be provided to you in the form of a CSV table with verified and parsed addresses.

Using this method will not work for large amounts of addresses since it is only suitable for small amounts of addresses. Developers must cite the sources of the results when using them: OpenStreetMap, OpenAddresses, and more.

Address Parsing Through Geocoding API

Geocoding API is one of the most powerful yet complicated to use. it helps multitasks a lot better than any other solution including address parsing, standardizing, and validation at a single time. 

Using this method, the data is made clearer and more accurate, as well as checking whether the address is actually located. Consequently, you won't have to deal with an address that doesn't exist. Additional useful information is also available.

PostGrid‘s Geocoding API assigns a confidence level to each location. There are several levels of clarity checked, and the program shows where the mistake is: a street name, a house number, or a city name.

The following data is generally returned from a PostGrid’s International Address verification API:

  • The longitude and latitude coordinates of a suitable location;
  • Normalization of postal addresses;
  • The full address is standardized, including the address components;
  • Each component's level of confidence;
  • We test and parse each address.

You should remember a few specifics when using the Geocoding API for developers. Obviously, non-confirmed addresses require additional logic. Additionally, APIs for large amounts of data are usually expensive.

Which is the Best Method to Choose for Address Parsing?

When working with address strings, we recommend the following algorithm:

  • Use Geocoding APIs if you are trying to get the location of an address or normalize it.
  • It is advisable to use RegEx in case all the addresses have identical formats and are regular.
  • You can also use Libpostal to parse addresses if you can't find a suitable NPM library.

These are some of the most common methods for parsing addresses. To settle down for the most suitable address parsing API, you must start by identifying your goals precisely and trying an integrating PostGrid's address verification APIs.

However, When you want to parse bulk addresses or addresses from several cities or localities, it is best to go for the most versatile or innovative solution. An address parsing with geocoding can also help you deal with bulk datasets. 

Why Using PostGrid’s Address Verification API is Your Best Bet to Parse Mailing Addresses?

Over 67% of website visitors abandon online forms to never return on facing complications.

The reason could be anything; customers are ready to abandon their shopping carts, signup processes, and websites for every little issue.

Thus, it is best to prepare for these situations and make your forms easier to fill out. Shorten your checkout process. Help customers complete these mailing addresses within a few keystrokes.

These steps can make a broad difference in your sales and revenue levels.

Thus, you cannot make compromises here! Using PostGrid’s address verification solutions to parse and verify your mailing lists helps you stay ahead of the game.

You can instantly capture the customers’ correct addresses, parse them, and check whether they are deliverable—all in one go at lightning speeds.

Parse Addresses Via Our API

Use our detailed API docs to integrate our address verification solutions into your website or CRM without technical expertise.

You can always contact our technical support team if you encounter any issues.

Also, you can integrate our API into popular platforms, like HubSpot, Quickbooks, Salesforce, and ActiveCampaign.

Point-of-Entry and Bulk Address Verification

Businesses can validate their customers’ addresses at the entry point to avoid incorrect details entering their system. It also saves time and effort, facilitating shipping.

Imagine a customer who wants to purchase something from your website. You promise them speedy shipping within four days. And you charge extra for it.

In this case, you must guarantee that the order reaches the customer within four days by any means possible. Otherwise, the buyer might get annoyed and leave negative feedback. Or they could cancel the order and stop buying from you.

One angry customer = several lost buyers.

Though the delay was not your fault, they might spread negative publicity about your business. The customer entered the incorrect street name, causing the issue.

Point-of-entry address parsing and verification indicate that the customer entered incorrect details. Thus, you can instantly solve the issue and proceed with order fulfillment.

Bulk address verification is different from real-time or point-of-entry validation. It refers to cross-checking up to hundreds of thousands of addresses simultaneously.

You may use this feature to update your old customer records and make them as good as new! Hence, it opens fresh opportunities to re-engage past buyers and expand your business.

International Address Verification

PostGrid can verify addresses for 245+ countries. Hence, businesses with customers worldwide can rest assured they have the correct details in their database.

Our API can transliterate and reformat addresses according to the destination country’s guidelines.

Flexible Prices

We offer the most affordable rates for address verification. Hence, you no longer need to spend a fortune maintaining accurate mailing databases or completing customer orders on time.

Frequently Asked Questions

  • How exactly can I parse a postal address?

If you are a developer, try using regex if the addresses have similar formatting or regular. Also, if you are about to parse complex addresses, you must use the NPM library or Libpostal. Lastly, you can choose PostGrid to parse addresses and initiate autocomplete processes to locate the same. 

  • What are the NPM libraries that can be used to initiate Address Parsing processes?

As we mentioned above, countless npm libraries can use to initiate address parsing. However, always verify the licenses before adding the package, order, or mail item to a commercial project. 

  • How exactly can I use Geocoding with address parsing?

The geocoding help you look for corresponding delivery destinations for the provided data. Additionally, it also does a lot more than just address parsing. Geocoding tries you understand the address, city, state, and street. So, you can easily get the standardized, normalized, and verified addresses as your outcome. 

  • What is address normalization?

Address Normalization or standardization is said to be a process of formatting unstructured addresses depending on country mail standards. Also, this process replaces abbreviations with several traditional names or more.  


The process of address parsing is said to be a small step within address verification or validation – and it is crucial. 

It also helps clear up redundant addresses or information across various datasets. Furthermore, it also helps you create unique data analysis filters, identifiers, and more. This allows for address standardization, and can also help you clean your entire datasets followed by de-duplication. 

Sign up if you want to initiate the address parsing process. 

Ready to Get Started?

Start transforming and automating your offline communications with PostGrid


Explore Direct Mail

Send direct mail as easy as email through our dashboard or API