Live: Tor + abuse feeds refreshed every 6 hours

Hong Kong phone number format

Country code +852, 8 digits after it. Below is the same example written every way you are likely to need it.

Convert your own Hong Kong number

Paste it however you have it — you get it back in every notation below, plus whether that number is really allocated.

Paste the number however you have it — national digits are fine, the country is already set. Change the picker if the number is from somewhere else.

Example mobile number

Country calling code+852
National format5123 4567
International format+852 5123 4567
E.164 (use this in APIs)+85251234567
Digits after country code8
National trunk prefixnone

This is a numbering-plan example, not a real subscriber’s line. It is generated from the same data the validator uses, so it always matches what the API accepts.

Why your form rejects valid Hong Kong numbers

Nearly every wrongly-rejected Hong Kong number on a signup form comes down to one of three things.

  1. The country code is being added twice, or not at all

    Hong Kong numbers carry no trunk prefix, so the national digits and the international ones are the same after +852. The usual failure is the opposite one — storing 5123 4567 with no country code at all, which is ambiguous the moment a second country is supported.

  2. A length check borrowed from another country

    Hong Kong runs 8 digits after +852. A hand-written \d{10} was almost certainly correct for whichever country the form was built in, and is wrong here. Length rules are per-country and several countries use more than one.

  3. A regex cannot know what was ever issued

    Right country code and right length still passes numbers no carrier was ever assigned — which is exactly what someone inventing a number at signup produces. Pattern matching answers “could this exist”, never “does it”.

For the first two, use a numbering-plan library rather than a pattern. This is the same call the examples on this page are generated from:

import { parsePhoneNumberFromString } from "libphonenumber-js";

// what a Hong Kong user types into your form
const typed = "5123 4567";

const n = parsePhoneNumberFromString(typed, "HK");

n?.isValid();        // true
n?.format("E.164");  // "+85251234567"  <- store THIS

What parsing still cannot tell you

The third one has no offline answer. Whether the range was allocated, whether it is mobile, fixed line or VoIP, and whether the number has been reported for abuse are all lookups, not patterns — and on a signup form they are the half that decides anything.

curl "https://www.layercall.com/v1/lookup/phone?phone=%2B85251234567" \
  -H "X-Api-Key: YOUR_KEY"

1,000 lookups a month free, no card. Get an API key.

Got a column of them?

One number is a demo. If what you actually have is a CRM export, a signup dump or a list you inherited, paste the whole thing — every row gets parsed and scored, Hong Kong numbers alongside any other country, with duplicates removed and counted first.

Check a whole list — free, no signup →

Questions

Why does my signup form say a valid Hong Kong number is invalid?

Usually a length rule copied from another country, or a number stored with no country code at all. Hong Kong numbers carry no trunk prefix, so 5123 4567 and +85251234567 hold the same digits after +852 — but a bare national number is ambiguous the moment your form accepts a second country.

How do I convert a Hong Kong number to E.164?

Drop any spaces, brackets and dashes, and put +852 in front — 5123 4567 becomes +85251234567. Do it with a numbering-plan library rather than string surgery: the rules differ per country and several countries have more than one valid length. The converter at the top of this page does exactly this and shows the result.

What is the country code for Hong Kong?

Hong Kong's country calling code is +852. In E.164 — the format almost every API, SMS gateway and CRM expects — it is written with no spaces, brackets or dashes, like +85251234567.

How many digits is a Hong Kong phone number?

8 digits after the +852 country code. Written nationally it may show no trunk prefix.

Does the leading 0 get included when dialling Hong Kong from abroad?

Hong Kong numbers do not use a national trunk prefix, so the national and international digits are the same after the +852 country code.

Is a correctly formatted number the same as a real one?

No, and conflating the two is the usual mistake. Formatting only says a number could exist. It does not say whether the range was ever allocated, whether it is mobile, fixed line or VoIP, or whether it is worth trusting on a signup — those need a lookup against numbering-plan data.

Other countries

All 95 countries →