Skip to content
UniKit

Address parser

Splits one Chinese address into province, city, district, street and house number, and pulls out an 11-digit mobile number and a 6-digit postal code; you choose whether the parts are joined with spaces. The province list covers the 34 provincial-level regions (full and short names), streets are cut on suffixes such as 街道 / 镇 / 乡 / 苏木, and missing levels stay empty instead of raising an error.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Normalised address

Rejoined as province → city → district → street → detail; levels that cannot be recognised are skipped.

Paste an address to see the parsed parts and the counts

What this tool does

  • Split a pasted Chinese address into province / city / district / street / detail and rejoin it in a fixed order for consistent storage.
  • Pick the 11-digit mobile number and 6-digit postal code out of the address without writing another regex.
  • Normalise a shipping or customer list: choose space-separated or joined output while missing levels are skipped silently.

Example

Input

广东省广州市天河区体育西路101号 13800138000

Output

广东省 广州市 天河区 体育西路101号 13800138000

Parts are joined with spaces by default and the phone number is appended last; turning the space option off yields 广东省广州市天河区体育西路101号13800138000.

Frequently asked questions

How are province, city and district recognised?

Not from a full gazetteer. Two rule sets are used: the province matches one of the 34 provincial-level names or short forms (广东省 / 广东), while city, district and street are cut on suffixes — 自治州 / 地区 / 盟 / 市 for cities, 自治县 / 自治旗 / 新区 / 区 / 县 / 旗 / 市 for districts and 街道办事处 / 街道 / 镇 / 乡 / 苏木 for streets, taking whichever appears first.

How are the phone number and postal code found?

Labels such as 手机: and 邮编: are handled first: the number after the label is taken and the whole labelled span is removed. Without a label, the first 11-digit number starting with 1[3-9] becomes the mobile number and the first standalone 6-digit number the postal code, and either is removed from the detail part so it is not repeated. Landlines with an area code are not treated as mobile numbers, and a postal code glued to a house number may still be missed.

What happens when a level is missing?

Nothing is thrown: whatever was recognised is concatenated in province → city → district → street → detail order. Only when no part is recognised at all (pure Latin text or digits) do you get an unparsable-address error; empty input raises an empty-input error.

Keywords:Address parseraddress-parseofflinedeterministic

Related tools