The four formats side by side
All four rows below describe the same made-up account. Nothing here is tied to a real person.
| Format | Example | Where you usually see it |
|---|---|---|
| SteamID64 | 76561198083722517 | Profile links like steamcommunity.com/profiles/7656..., the Steam Web API, most bots and trading sites |
| Steam3 | [U:1:123456789] | Game server logs and console output in many Source engine games |
| Steam2 | STEAM_1:1:61728394 | Older game servers, admin plugins and ban lists |
| Konto-ID | 123456789 | The 32-bit number inside the other three. Some game APIs and stats sites use it on its own |
A custom profile link such as steamcommunity.com/id/yourname is a fifth thing people call a "Steam ID". It isn't one. It's a nickname the owner can change, and it has to be looked up on Steam's side to get the real number. More on that below.
What the SteamID64 is made of
A SteamID64 is a 64-bit number split into fields. For an ordinary user account the top fields never change, which is why every personal SteamID64 starts with 7656119.
| Bits | Field | Value for a normal user |
|---|---|---|
| 56 to 63 | Universe | 1 (Public) |
| 52 to 55 | Account type | 1 (Individual) |
| 32 to 51 | Instance | 1 for user accounts |
| 0 to 31 | Konto-ID | The part that's different for every account |
Put those fixed fields together and you get the constant 76561197960265728. In hex that's 0x0110000100000000. Every conversion on this page is just adding or subtracting that number and then formatting the account ID.
Groups, game servers and a few other things use different account types (a Steam group is type 7, "Clan"), so their 64-bit IDs start differently and the user formulas here don't apply to them.
Converting by hand
SteamID64 to everything else
- Subtract the constant:
76561198083722517 - 76561197960265728 = 123456789. That's the account ID. - Steam3: wrap it,
[U:1:123456789]. - Steam2:
123456789 mod 2 = 1andfloor(123456789 / 2) = 61728394, soSTEAM_1:1:61728394.
Steam2 back to SteamID64
For STEAM_X:Y:Z the account ID is Z * 2 + Y. Then add the constant. 61728394 * 2 + 1 = 123456789, and 123456789 + 76561197960265728 = 76561198083722517.
STEAM_0 or STEAM_1?
You'll see both in the wild for the same account. Plenty of tools and ban lists still write STEAM_0:1:12357840 where others write STEAM_1:1:12357840. The account is decided by the last two numbers, so compare on those and ignore the first digit. Our finder accepts either and outputs STEAM_1.
Code you can copy
Python
BASE = 76561197960265728
def from_steam64(steam64: str) -> dict:
account = int(steam64) - BASE
return {
"account_id": account,
"steam3": f"[U:1:{account}]",
"steam2": f"STEAM_1:{account % 2}:{account // 2}",
}
def steam2_to_64(steam2: str) -> str:
_, y, z = steam2.split(":")
return str(BASE + int(z) * 2 + int(y))
JavaScript
const BASE = 76561197960265728n;
function fromSteam64(steam64) {
const account = BigInt(steam64) - BASE;
return {
accountId: account.toString(),
steam3: `[U:1:${account}]`,
steam2: `STEAM_1:${account % 2n}:${account / 2n}`,
};
}
Custom URLs need a lookup
You can't calculate a SteamID64 from steamcommunity.com/id/yourname. Steam keeps that mapping, and the owner can change the name whenever they like. To resolve one in your own code, call Valve's ISteamUser/ResolveVanityURL with a Steam Web API key and url_type=1 for a personal profile (2 is a group). Valve's page lists the parameters but not the response. In our experience a success of 1 comes back with the steamid, and a success of 42 means no profile has that name.
Store the SteamID64, not the custom name. If you key a database or a ban list on the nickname, it breaks the day someone renames their profile.
Display names and friend lists don't identify an account either. Lots of people share a display name. If someone gives you only that, ask for their profile link.
Quick sanity checks
- A personal SteamID64 has 17 digits and starts with
7656119. - After subtracting the constant, the account ID should be above 0 and fit in 32 bits (4294967295 or less).
- A converted ID can be valid maths and still not belong to a real account. Open
steamcommunity.com/profiles/<SteamID64>to check. - When you compare Steam2 IDs from different games, ignore the first digit.
Sources
- Valve's Source SDK 2013, steamclientpublic.h, for the bit layout, universes and account types.
- Valve Developer Community: SteamID, the community write-up of the Steam2 and Steam3 text formats.
- xPaw/SteamID.php, an MIT-licensed converter whose examples match the formulas above.
- Steamworks Web API: ResolveVanityURL, for custom URL lookups.
HourIdler uses these same rules in its free Steam ID finder. It runs the conversion on our server and only calls Valve's official endpoint for custom URLs. It never signs in to Steam. If you found an error on this page, tell us on support and we'll fix it.