Skip to content

+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.

Mobile numbers start with:0107
Mobile prefix blocks by operator
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.

+254
country code
712
network code
123456
subscriber number
CountryKenya numbering plan
Line typeMobile
Carrier the block was allocated toSafaricom
E.164+254712123456
International+254 712 123456
National0712 123456
RFC 3966tel:+254-712-123456

Source: National numbering plan: Kenya (ITU)

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.

Line types to accept
^(?:(?: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})$
NumberNational digitsMatches
0712 123456712123456Mobile
020 2012345202012345Fixed line
0800 223 456800223456not in the ticked types
0900 223 456900223456not 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 portabilityYes

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 typeNational digitsExample, nationalExample, E.164
Mobile90712 123456+254712123456
Fixed line7 to 9020 2012345+254202012345
Toll-free9 or 100800 223 456+254800223456
Premium-rate90900 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})$

Premium-rate, 9 digits

^(?:900[02-9]\d{5})$

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.

OperatorLine typePrefix blocksRanges
SafaricomMobile13011, 014, 018, 070–072, 074, 079, 0757–0759, 0768–0769
AirtelMobile5010, 073, 075–076, 078
TelkomMobile3077, 0120, 0761
FinserveMobile10124
Homeland MediaMobile10744
InfuraMobile10121
JTLMobile10747
NRG Media LimitedMobile1013

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.