Address & Postcode Widgets
Address Validation with HTML
JavaScript Code Generator
Address Validation with JavaScript
jQuery Autocomplete

JavaScript Code Generator

Generate a JavaScript code snippet to find and validate addresses on website forms

Run any Addy API live with Addy Swagger UI on us for free with 'demo-api-key' API key

Address Validation Code Generator

Locate the address field ids on your website, enter them into the code generator below and a JavaScript code snippet will be generated that can be deployed on your website to find and validate NZ addresses in real-time.

Code Generator

create a key
how to find it

Address Form Fields

Fill in as many of the fields below that will be populated when an address is selected.

Address Validation Code Snippet

Please fill out the form to generate your custom snippet

How to find address field ids

Locating the address field ids on your website is easy. Just follow the steps below.

  • Browse to the address form page of your website (e.g. the checkout or sign-up page)
  • Right click on the address input field and select "Inspect" (Chrome) or "Inspect element" (Edge / IE) as shown below.
  • Example input field with context menu showing
  • The input field should look similar to the HTML code below:
  • <input type="text" id="address_field_1" />
  • Write down the id of the input field. In the exampe above it is "address_field_1".
  • Repeat steps 2 - 4 for each input field id such as "suburb" and "city"

Now that you have all of the address field ids, you can use the address validation code generator.

Testing address validation in your web browser

Follow the steps below to test the address validation code snippet in your browser, with no installation or web deployment required.

  • Browse to the address form page of your website (e.g. the checkout or sign-up page)
  • Press F12 on your browser (e.g. Chome, FireFox, Edge, IE) to open the developer tools and click on the Console tab.
  • Copy and paste the generated code snippet into the console window and press "Enter" as shown below.
  • Chrome:

    Sceenshot of Addy code in a Google Chrome Console


    Sceenshot of Addy code in a Microsoft Edge Console


    Sceenshot of Addy code in a Firefox Console
  • Verify that the address autocomplete functionality is working by typing in an address on the page.

Installation Options

Use one of the follow techniques to publish the code snippet to your website:

Sign up

Full support

Sign up

Full support

Address Services

Address AutocompleteAddress CleansingAddress GeocodingPostcode FinderPricingSign inSign up
© 2023 Addy LimitedTerms & Conditions
Made in Auckland, New Zealand
Looking for Addy Australia?