Sign up and contact support to get 100 free checks.Sign up free

How to Convert a Phone List to E.164 Before a Telegram Check

Step-by-step spreadsheet method to convert phone numbers to E.164: strip symbols, drop trunk prefixes, add country codes, and validate before a Telegram check.

TG Validator Editorial TeamPublished October 23, 20267 min read
TG Validator workflow illustration for How to Convert a Phone List to E.164 Before a Telegram Check
A visual overview of the workflow discussed in this TG Validator article.

A spreadsheet-level workflow for turning local phone numbers into E.164 so a Telegram registration check or single-country bulk file can read them.

To convert phone numbers to E.164, remove spaces and symbols, drop any national trunk prefix such as a leading zero, and write a plus sign followed by the country code and the remaining digits. The result has no spaces or punctuation and uses at most 15 digits. Doing this in a spreadsheet before a Telegram registration check keeps numbers readable for the realtime check and for single-country bulk files.

What E.164 requires

E.164 is the international public telecommunication numbering plan published by the ITU, described on the ITU recommendation page. In everyday data work it means one canonical shape: a plus sign, the country code, then the subscriber number including any area code, with no spaces, brackets or hyphens. The total length is at most 15 digits.

Two habits cause most conversion errors. The first is treating a local number as if it were international. A number written the way people dial it at home often starts with a trunk prefix, which is not part of the international form. The second is treating a plus sign as decoration. In spreadsheets, a leading plus is often interpreted as a formula operator, so the cell silently loses it.

TG Validator's realtime check takes one E.164 phone number. Its dashboard and bulk files for phone numbers expect international phone country codes, so a clean E.164 column is the right preparation for either route.

Step 1: Keep the column as text and make a backup

Before changing anything, copy the original column to a new sheet or tab. Conversion is easy to get wrong, and the untouched original lets you trace any number back.

Then set the working column format to plain text. In Excel or Google Sheets this stops the program from stripping leading zeros or reading a leading plus as arithmetic. If the file arrives as CSV, import it with the phone column explicitly typed as text instead of letting the program guess.

Step 2: Strip everything that is not a digit

Remove spaces, hyphens, dots, brackets and any text such as extension labels. In Google Sheets, a regular-expression replace on the column does it in one step: replace any non-digit character with nothing. In Excel, nested SUBSTITUTE calls for each symbol achieve the same result, or Power Query's text clean step can handle a whole column.

Keep a note of numbers that began with a plus sign or with a double-zero international prefix before stripping. Those already carry a country code and need different handling in the next step. A quick helper column that records whether the original started with the plus or the double zero makes that easy.

Step 3: Remove the trunk prefix and add the country code

This is the step that needs a decision per country, so work on one country at a time.

  • Already international. If the original started with a plus or a double-zero prefix, the digits that follow are the country code and number. Remove the double-zero prefix and put a plus in front.
  • Local with a trunk prefix. Many countries write national numbers with a leading zero that is dropped in international form. Remove that single leading digit, then add the plus and country code.
  • Local without a trunk prefix. Some national plans have no trunk prefix, so the digits are kept as they are and only the plus and country code are added.

For a sheet with a country column, a lookup table of country name to country code, plus a column recording whether that country uses a leading trunk digit, drives the formula. The result is one new column: plus, then the code, then the number with the trunk digit removed where it applies.

Do not guess a country for a number that does not state one. A short list of rows without a clear country is better set aside than assigned a default that sends them into the wrong group.

Step 4: Validate length and look for outliers

A few quick checks catch most of what formulas miss.

  • Length. After the plus, the number should be at most 15 digits. Anything longer is an error.
  • Too short. Very short results usually mean a missing area code or a pasted extension.
  • Repeated country codes. A number that already contained its code and had it added again will start with the code twice. Sort by the first few digits to spot these.
  • Mixed countries in a single-country file. Bulk phone tasks work on one selected country, so group rows by country code and export one file per country. The list should be essentially the selected country, since a file with a large share of other country codes is rejected.

Keep a reject tab with the original value, the converted value and the reason it failed. That tab is the working list for manual fixes.

Step 5: Export for the realtime check or for a bulk file

Decide the route by list size.

For a small set, run the realtime Telegram registration check. The REST route is POST /api/v1/check, authenticated with X-API-Key, with one E.164 number and the tg service type, and POST /api/v1/batch-check accepts up to 100 numbers in one request. The dashboard Batch Check tab accepts up to 500 pasted numbers. All of these return in the same session.

For a list far beyond that, export a TXT or CSV with one number per line, upload it as a bulk task for the chosen country, wait for the task, and download result.csv. Exact per-service limits are in the current API documentation and the pricing page, so check them before a large run.

Numbers for mainland China, Hong Kong and Macau can be checked one at a time at small volumes in the realtime single check, but asynchronous bulk files do not support those regions, so keep them out of bulk exports.

What a clean E.164 file does and does not give you

Clean formatting removes the most common cause of unreadable input, but it does not change what the check means. A registration result is a platform-specific account-presence signal at check time. It does not show activity, identity, ownership, consent or reply likelihood, so keep your normal permission and relevance rules in place after the check.

A useful final habit is to keep the converted column next to the original in the master sheet, with the conversion date, so later imports can be matched without repeating the work.

FAQ

How can teams convert local phone numbers to E.164 in a spreadsheet?

Teams can strip non-digit characters, remove any national trunk prefix, then add a plus sign and the country code. Working one country at a time with a lookup table keeps the formula simple.

What is the maximum length of an E.164 number?

An E.164 number has at most 15 digits after the plus sign, with no spaces or punctuation. Longer results usually indicate a duplicated country code.

How can teams stop a spreadsheet from removing the leading plus sign?

Format the phone column as plain text before entering or importing values, and import CSV files with the phone column typed as text so the plus sign and any leading zeros are kept.

Do bulk Telegram files need a single country?

Yes. Phone-number bulk tasks work on one selected country, so group rows by country code and export a file per country; files with a large share of other country codes are rejected.

Learn More

Choose the product information that fits the next step in your workflow.

Sources