Telegram ID format

One number, five ranges. The range tells you whether an ID is a user, a basic group, a channel or supergroup — and how to convert it.

Scale is compressed (log of the magnitude) so all ranges fit. Hatched = reserved for secret chats, which bots never see. Look up an ID above and it is pinned here. Ranges from Telegram's Bot API dialog IDs page.
User or bot

1 … 1,099,511,627,775

Basic group

−1 … −999,999,999,999

Channel / supergroup

−1,000,000,000,001 … −1,997,852,516,352

Secret chat

−1,997,852,516,353 … −2,002,147,483,648

Channel direct messages

−2,002,147,483,649 … −4,000,000,000,000

Converter

Bot API chat_id ↔ MTProto ID ↔ private message link. Type in any field. Nothing leaves your browser.

Channel / supergroup. −(10¹² + MTProto channel ID). This is the −100 prefix.

Every ID range

From Telegram's own “Bot API dialog IDs” page.

KindFromTo
User11099511627775
Group-999999999999-1
Channel-1997852516352-1000000000001
Secret chat-2002147483648-1997852516353
Monoforum-4000000000000-2002147483649

Conversion rules

As documented by Telegram (core.telegram.org/api/bots/ids). “MTProto ID” is what TDLib, Telethon, Pyrogram and t.me/c links use.

User or botbot_api_id = user_idPositive. The same number in the Bot API and in MTProto.
Basic groupbot_api_id = −chat_idThe MTProto chat ID with a minus sign.
Channel / supergroupbot_api_id = −(1000000000000 + channel_id)−(10¹² + MTProto channel ID). This is the −100 prefix.
Secret chatbot_api_id = secret_chat_id − 2000000000000Secret chats (MTProto ID − 2 × 10¹²). The official Bot API never returns these.
Channel direct messagesbot_api_id = −(1000000000000 + monoforum_id)Direct-message chats of channels (monoforums): −(10¹² + MTProto ID), from their own range.

FAQ

What does -100 in a Telegram chat ID mean?

It marks a channel or supergroup. The Bot API ID is −(1,000,000,000,000 + the channel's MTProto ID), so the digits “100” followed by the channel's own number appear after the minus sign.

How do I convert a channel ID to a Bot API chat_id?

Write −100 in front of it: MTProto channel ID 1234567890 becomes chat_id −1001234567890. To go back, remove the −100. The converter on this page does both directions.

Is a negative ID always a channel?

No. −1 to −999,999,999,999 are basic groups. Channels and supergroups are −1,000,000,000,001 to −1,997,852,516,352. A positive ID is always a user or a bot.

Why did my group's ID change?

A basic group that is upgraded to a supergroup gets a new ID in the channel range (−100…). The update that announces it carries migrate_to_chat_id with the new value; the old ID stops working.

Do IDs fit in a 32-bit integer?

No. User IDs go up to 1,099,511,627,775 and channel IDs beyond −10¹². Store chat and user IDs as 64-bit integers (or as strings in JSON-only systems); a double-precision float holds them exactly, since they stay below 2⁵².