+254
Kenya phone numbers
0712 123456
International +254 712 123456, E.164 +254712123456
The numbering plan of Kenya: formats, lengths, the regular expression for each line type and the prefix blocks allocated to each carrier, as ITU publishes it. A pattern says what a number looks like and where it was allocated; whether it is in service, and who serves it today, is a different question (below).
At a glance
- Country code
- +254
- Exit code
- 000
- Trunk prefix
- 0
- Mobile digits
- 9
- Fixed-line digits
- 7 to 9
- Number portability
- yes
- Carriers on record
- 8
How to dial a number in Kenya from anywhere: the dialling helper.
| Safaricom | 13 |
|---|---|
| Airtel | 5 |
| Telkom | 3 |
| Finserve | 1 |
| Homeland Media | 1 |
| 3 other operators | 3 |
prefix blocks allocated, from the published records; a block is a prefix at the plan's allocation length
Check a number
Valid mobile number in Kenya.
| Country | Kenya numbering plan |
|---|---|
| Line type | Mobile |
| Carrier the block was allocated to | Safaricom |
| E.164 | +254712123456 |
| International | +254 712 123456 |
| National | 0712 123456 |
| RFC 3966 | tel:+254-712-123456 |
Test a pattern
Tick the line types you accept, copy the combined pattern, and paste numbers to see which range each one falls in. Numbers are reduced to their national digits first (no spaces, no +254, no trunk prefix 0); nothing leaves your browser.
^(?:(?:1(?:0[0-8]|[18]\d|2[014]|30|4[0-5])|7\d\d)\d{6}|(?:4[245]|5[1-79]|6[01457-9])\d{5,7}|(?:4[136]|5[08]|62)\d{7}|(?:[24]0|66)\d{6,7})$| Number | National digits | Matches |
|---|---|---|
| 0712 123456 | 712123456 | Mobile |
| 020 2012345 | 202012345 | Fixed line |
| 0800 223 456 | 800223456 | not in the ticked types |
| 0900 223 456 | 900223456 | not in the ticked types |
Need another country, or the pattern as code in your language? Open the regex builder.
Walk the prefixes
Type the first digits of a number in national form, or tap them: the operators holding blocks under those digits, then the block a full prefix falls in. 26 blocks held by 8 operators are on record.
Type the first digits of a number in national form.
In full
Cheat sheet
| Country code | +254 |
|---|---|
| International exit code (dialling out) | 000 |
| Trunk prefix (national dialling) | 0 |
| Mobile number length (national digits) | 9 |
| Fixed-line number length (national digits) | 7 to 9 |
| E.164 example | +254712123456 |
| RFC 3966 (tel: URI) | tel:+254-712-123456 |
| Mobile number portability | Yes |
Line types and their regular expressions
Match each pattern against the national significant number: digits only, without the trunk prefix 0 and without +254. The patterns follow the national numbering plan and are anchored here.
| Line type | National digits | Example, national | Example, E.164 |
|---|---|---|---|
| Mobile | 9 | 0712 123456 | +254712123456 |
| Fixed line | 7 to 9 | 020 2012345 | +254202012345 |
| Toll-free | 9 or 10 | 0800 223 456 | +254800223456 |
| Premium-rate | 9 | 0900 223 456 | +254900223456 |
Mobile, 9 digits
^(?:(?:1(?:0[0-8]|[18]\d|2[014]|30|4[0-5])|7\d\d)\d{6})$Fixed line, 7 to 9 digits
^(?:(?:4[245]|5[1-79]|6[01457-9])\d{5,7}|(?:4[136]|5[08]|62)\d{7}|(?:[24]0|66)\d{6,7})$Toll-free, 9 or 10 digits
^(?:800[02-8]\d{5,6})$Carrier prefix blocks
The operator each prefix block was allocated to, in national form, from the published allocation records for +254. Numbers are portable, so this is the original allocation, not necessarily the carrier serving a number today.
| Operator | Line type | Prefix blocks | Ranges |
|---|---|---|---|
| Safaricom | Mobile | 13 | 011, 014, 018, 070–072, 074, 079, 0757–0759, 0768–0769 |
| Airtel | Mobile | 5 | 010, 073, 075–076, 078 |
| Telkom | Mobile | 3 | 077, 0120, 0761 |
| Finserve | Mobile | 1 | 0124 |
| Homeland Media | Mobile | 1 | 0744 |
| Infura | Mobile | 1 | 0121 |
| JTL | Mobile | 1 | 0747 |
| NRG Media Limited | Mobile | 1 | 013 |
Questions developers ask
- How many digits does a phone number in Kenya have?
- Mobile numbers have 9 national digits. Fixed line numbers have 7 to 9 national digits. That is the national number, without the country code +254 and without the trunk prefix 0.
- What is the country code for Kenya?
- +254. From abroad, dial your own exit code, then 254, then the national number without its trunk prefix 0. From inside Kenya, the exit code for international calls is 000.
- Which prefixes are mobile numbers in Kenya?
- Mobile numbers start with 01 or 07 in national form; the mobile regular expression on this page gives the exact ranges (example: 0712 123456). The carrier table shows which prefix blocks were allocated to which operator.
- Can a mobile number in Kenya be ported to another carrier?
- Yes. Kenya has mobile number portability, so a prefix tells you the carrier a number was originally allocated to, not necessarily the one serving it today. Only a live carrier lookup (an HLR or MNP query) answers that.