EircodeJS

An unofficial JavaScript library for working with Eircodes (Irish postcodes)

View the Project on GitHub daviddoran/eircode-js

EircodeJS is a JavaScript library for parsing and validating Eircodes (Irish postcodes).

The full Eircode specification hasn't been released yet. Until it has, and until we've tested EircodeJS against it, you should assume that everything's subject to change. If you find a bug or have a feature suggestion please file an issue on GitHub.

Interactive Demo

Type an Eircode or click one of the examples below:

A65 F4E2 · D6W V234 · 01D-5555 · D6B-RTA2 · A65-1234 · W22-AB2 · A6

A65 F4E2
Eircode is valid

Parse Result

Routing Key Unique Identifier
A65F4E2

Here's the raw output of EircodeJS.parse('A65 F4E2').toJSON()

{
  "hasEircode": true,
  "error": null,
  "logs": [],
  "eircode": "A65F4E2",
  "routingKey": "A65",
  "uniqueIdentifier": "F4E2",
  "hasRoutingKey": true,
  "hasUniqueIdentifier": true
}