USSD and GSM Codes: The List, and What Each One Does

· · 7 min read

Close-up of two hands holding a smartphone, thumbs resting over the on-screen keypad.
Every code below is typed into the dialler rather than found in a settings menu, which is why the same string behaves the same way on almost any network.

A USSD code is a short string beginning with an asterisk or hash that you type into the dialler to talk to your network directly — *#06# to see your IMEI, *#21# to ask whether your calls are being forwarded. They are not an app or a feature a carrier chose to add. Most of them are standardised, which is why the same code behaves the same way on a phone in Lisbon and a phone in Manila.

The list below separates the codes that work almost everywhere from the ones that depend on your carrier, because that distinction is the thing most lists leave out — and it is the reason a code you read somewhere returns nothing on your phone.

USSD codes and GSM codes are the same thing

The two names get used interchangeably and the distinction is mostly historical. What people call GSM codes are the standardised supplementary-service codes defined in 3GPP TS 22.030, the specification covering the man-machine interface of the user equipment. That document is why *#21# means the same thing on every network: activation is *SC*SI#, deactivation is #SC*SI#, interrogation is *#SC*SI#, where SC is a two- or three-digit service code.

USSD proper — Unstructured Supplementary Service Data — is the transport underneath, an open session between your handset and the network. Carriers use it for the codes that are theirs alone: balance checks, data top-ups, plan menus. So the practical rule is that a standardised code works anywhere and a carrier code works on one network.

The codes that work on almost any network

These come from the specification rather than from your carrier, so they are the ones worth memorising:

  • *#06# — your IMEI, and on an eSIM-capable phone the EID alongside it. The one code that works with no SIM installed and no signal at all.
  • *#21# — interrogate unconditional call forwarding. Tells you whether every call is being diverted, and to what number.
  • *#61# — interrogate forwarding when you do not answer, and the ring delay before it triggers.
  • *#62# — interrogate forwarding when your phone is unreachable. This is the one voicemail usually uses.
  • *#67# — interrogate forwarding when your line is busy.
  • ##002# — erase every forwarding rule at once. The blunt instrument, and the right one if you are not sure what is set.
  • *#30# — whether the caller’s number is presented to you on incoming calls. This is CLIP, service code 30 in the specification, and it is the opposite direction from the next one.
  • *#43# — whether call waiting is on. *43# turns it on, #43# turns it off.
  • *#31# — whether your number is being withheld from the person you are calling. This is CLIR, service code 31. Prefixing a single call with #31# hides it just for that call.

Interrogation codes are safe: they ask a question and display the answer. It is the codes without the hash after the asterisk — the ones that set something — that change state.

Plans worth comparing

Live prices from the providers we track. Paid placements, and we say so because they are.

Call forwarding, in more detail

Forwarding is where these codes earn their keep, because the settings menu does not always show every rule that is set. A line can be forwarding on busy while appearing perfectly normal.

  • *21*number# registers unconditional forwarding to that number. #21# cancels it, *#21# checks it.
  • *61*number*11*seconds# forwards on no-answer after a delay you choose, in five-second steps up to thirty.
  • *62*number# forwards when the phone is off or out of coverage.
  • *67*number# forwards when the line is busy.

On an iPhone the same settings live in Settings, then Apps, then Phone, then Call Forwarding — Apple documents setting up call forwarding on iPhone — but the menu only exposes unconditional forwarding. The conditional rules are reachable by code and, on many networks, by code only.

Why a code sometimes does nothing

Four reasons, in roughly the order they turn out to be the explanation:

  1. It is a carrier code, not a standard one. Balance and top-up codes are specific to one network, which is why a list written for a US carrier returns nothing on a European SIM.
  2. The line has no service. Everything except *#06# needs to reach the network.
  3. You are on the wrong line. A dual-SIM phone runs the code on whichever line the dialler is set to, so a code aimed at your travel eSIM can land on your home number.
  4. The network does not offer that supplementary service. Interrogating something a carrier never implemented returns an error rather than a no.

Codes that promise a hidden engineering menu are a separate case: some genuinely exist, most are copied between listicles until nobody knows which phones they applied to, and a few are specific to one manufacturer and one firmware version. Nothing on the list above is in that category.

Which codes matter when you travel

Two, mainly. Before you leave, *#06# tells you whether the phone has an EID and can therefore take an eSIM at all — no EID, no eSIM, and no update will add one. That one check settles whether your phone supports eSIM more reliably than any compatibility list. While you are away, *#21# and *#62# answer the question people actually have, which is why their calls or bank codes are not arriving: usually a forwarding rule set months ago and forgotten, sometimes voicemail intercepting on a line that is roaming.

The forwarding checks matter more on a dual-SIM setup, which is how most people travel now — home number kept live for calls and one-time passcodes, a travel eSIM carrying the data. If that is the arrangement you are planning, the thing to get right first is which plan the data comes from: compare eSIM plans by destination and check the per-gigabyte price before you buy at the airport.

Common questions

Are USSD codes safe to use?
The interrogation codes are — anything in the *#code# shape asks a question and displays the answer without changing a setting. The ones that set something are safe when you dial them deliberately and dangerous when somebody else asks you to, because *21*number# hands your calls and your SMS codes to whoever owns that number.
Why does *#06# work when the phone has no SIM?
Because it is answered by the handset rather than the network. The IMEI identifies the phone and the EID identifies the eSIM chip soldered into it, so both are known locally and neither needs a signal.
Do these codes work on an eSIM?
Yes — an eSIM is a profile on a chip, not a different kind of connection, so supplementary services behave identically. The one thing to watch on a dual-SIM phone is which line the dialler is using, since the code applies to that line and not to both.
What is the difference between a USSD code and a short code?
A USSD code opens a session with the network and returns a response on screen. A short code is a five- or six-digit number you send an SMS to, which replies by SMS. Carriers use both, often for the same job, which is why balance checks appear in either form depending on the network.

Ready to pick a plan?

Compare by destination

Keep reading

Guides that pick up where this one stops.