BNETDocs: Redux is no longer updated, this subdomain exists for archival purposes only. Visit the main site.


Generate Code: All packets

Notational Convention (Sizes & Types)

ItemMax. Length (bytes)Additional Notes
Username15Appended characters to enforce unique usernames (ie, #2) can increase the length of a username by 3 characters. In addition, Diablo II can have very long usernames, due to characters names/realms. The format is: "Character@Realm*Username@Realm" The lengths for these are: [15]@[6]*[18]@[6]. This results in a maximum possible username length, as received from, of 48 characters. Official Blizzard clients assign a 64-character variable for usernames, so the use of a variable of at least that length is advisable for future compatibility.
When creating an account, any username longer than 15 characters is truncated.
Character name15
Channel names31Any channel name who's length exceeds this value is truncated.
CD key owner15 Any key owner who's length exceeds this value is truncated.
Chat text224This is the maximum for game clients. Chat clients can receive up to 255 bytes of chat text. This includes the null terminator. Longer text is truncated.

Data types: All numeric types are little-endian. uses the following types:

  • STRING - Null-terminated array of characters.
  • WIDESTRING - A null-terminated UTF-8 string. See also: RFC 2279, WideCharToMultiByte()/MultiByteToWideChar(). Please also note that only Unicode-encodes strings for Starcraft and Brood War. Other clients are still using ASCII, although it's likely that this will change in the future.
  • STRING[] - An array of strings (see above). This type is generally only used when another field in the packet specifies how many entries there are.
  • STRINGLIST - A series of strings (see above) with an additional null-terminator at the end.
  • QWORD - 64 bit (8 byte) unsigned integer.
  • DWORD - 32 bit (4 byte) unsigned integer.
  • DWORD[] - The lack of a specified size indicates that the size is variable or unknown.
  • WORD - 16 bit (2 byte) unsigned integer.
  • BYTE - 8 bit (1 byte) unsigned integer.
  • BOOL - An unsigned little-endian integer (a byte) whose value is always 0 (FALSE) or 1 (TRUE). Can also be a DWORD, depending on the packet.
  • VOID - Data marked as VOID has no particular type or length. Where data is marked as VOID, additional information is given on its use.
  • FILETIME - A Windows struct, used to store filetime information. Can be read as a QWORD or two DWORDs
Some data which may at first appear to be strings are in fact DWORDs; game & platform codes, for example.

User Comments

For detailed questions and discussion, visit the Research Forum

Sep 09, 2011
09:09 PM

>Please also note that only Unicode-encodes strings for Starcraft and Brood War.
It's a little outdated, at least Warcraft 3 uses UTF-8. In addition, unicode support in Starcraft is broken, text is always encoded/decoded using cp1252<->utf8 schema, that's why utf-8 encoded text will be broken for all OSes that don't have locale set to cp1252 (Westeuropean). Because of that, using of non-ascii symbols in converstaion between game and non-game client with non-cp1252 OS locale is impossible.

You should really add last change date to pages :)

We recommend you use Firefox to view this site. This site has been optimized for Firefox.

Get Firefox
BNLS Server Status

= Online       = Offline Server Status v1 v2




= Online       = Offline


Site scripts and design copyrights reserved to Don Cullen.
Contents copyrighted to Blizzard and their parent corporation, Vivendi.
Main credits for contents goes to Arta. View the rest of credits.
Demented Minds copyrights reserved to Don Cullen 2003-present.
Copyright infringements will be prosecuted to the fullest extent allowable by law.
Please view our legal disclaimer and terms of service.