CS2 Crosshair Share Codes: What Those 46 Characters Hold
A current CS2 crosshair code is 46 characters holding 32 bytes and 23 console variables. Every field decoded, and how the old CSGO- code differed.
Somebody drops a code in chat. CS2YzM7EJwGv3sYsU4qmobJcPLZhFjKhr5q4Wb99W5xkPG. You paste it into the crosshair menu and you have their crosshair, and that is normally the end of the interaction.
Underneath, those 46 characters are a CS prefix and a base-57 number holding 32 bytes, and the bytes expand to 23 console variables. What follows is each of them, read out of the layout rather than out of a settings menu. Until 30 September 2026 a code was a different, shorter thing, and old ones still turn up in videos and config files, so the second half covers that format too.
What changed, and what to do with an old code. This guide is about what is inside a code. The update itself, Valve's wording and the console variables that no longer exist are in Old CS2 crosshair code not working? What changed in September 2026.
Just want the commands? Paste the code into the CS2 Crosshair Code Decoder and it prints the
cl_crosshair*lines for the current game, ready for the console. It reads both formats.
Where the layout comes from
Valve's 30 September notes say the format of the share code changed and that the scope dot scale and colour joined it.1 They say nothing about the layout, and Valve has published none.
The layout below comes from two open-source decoders that agree with each other: cs2-crosshair by setpos.gg, which says it is ported from the game client of 8 October 2026,4 and csxhair 2.0.0, whose tests hold 30 codes together with the console variables the game wrote for each.5 The decoder on this site reads all 30 and prints every variable exactly as the game wrote it.
That is strong evidence and it is not documentation. All 30 codes were set at 1080p, use three of the ten styles (2, 3 and 4) and a thickness of 1 or 2 pixels, and this guide has not tested the layout in the game itself.
Why a current code is 46 characters
The alphabet is the same 57 characters as before: the alphanumerics minus 0, 1, I, l and g, the glyphs that swap places when somebody reads a code off a stream overlay.6 Each character carries log2(57), about 5.83 bits.
Thirty-two bytes are 256 bits. Forty-three characters carry 250.8 bits, about five short. Forty-four carry 256.6, which fits with about six tenths of a bit to spare. The 44 characters are the shortest string that holds 32 bytes, and CS is the prefix in front of them.
The 32 bytes, one at a time
Drop the CS, read the 44 characters as a base-57 number with the first character as its lowest digit, and write that number out as 32 bytes. The example code above comes out as:
2c 01 38 04 04 00 ff ff
ff 00 00 00 dc 41 03 00
06 80 07 80 51 16 5a 00
00 00 00 00 00 00 00 00
Big-endian, checksum first. Bytes 23 to 31 are all zero here, as they are in all 30 exported codes.
Byte 0 is the checksum: the sum of bytes 1 to 31, modulo 256. Byte 1 is a version number, 1, and the decoder on this site refuses a code that says anything else. Bytes 2 and 3 are the screen height as a little-endian number: 38 04 is 0x0438, which is 1080.
That height is there because every size after it is in pixels. Valve's client keeps a hidden variable, cl_crosshair_screen_height, described as the resolution at which the user authored their size settings, with a default of 1080.3 Since 23 September the game rescales pixel counts when the display resolution changes.2 So a thickness of 1 in this code means one pixel on a 1080-line screen. Whether the game uses the stored height to rescale a pasted code is not something this guide has checked.
Byte 4 holds the style in its low five bits, in Valve's new numbering from 0 to 9, where 4 is Static Cross,3 and three switches in the top bits: follow recoil, centre dot and T shape. Bytes 5 to 8 are the crosshair colour as red, green, blue and alpha. Bytes 9 to 12 are the outline colour in the same order, the outline colour option Valve added on 30 September.1 Our example is an opaque cyan crosshair with a black outline at alpha 220.
Byte 13 packs the thickness, in pixels, into its low six bits and the outline mode into the top two: 0 for none, 1 for full, 2 for half.3 Bytes 14 and 15 are the gap as a signed 16-bit number, so a negative gap fits. Byte 16 is the length and byte 17 is the spread limit for dynamic styles.
Bytes 18 to 21 pack the other four dynamic-style settings (split distance, inner and outer split alpha, split ratio) at seven bits each, plus one bit for whether the scope dot takes the crosshair colour. Byte 22 is the scope dot scale. The example is a static crosshair, and its code still carries the split values.
Decoded, the example is a thin cyan static cross:
cl_crosshairstyle 4
cl_crosshair_length 6
cl_crosshair_thickness 1
cl_crosshair_gap 3
cl_crosshaircolor_r 0
cl_crosshaircolor_g 255
cl_crosshaircolor_b 255
cl_crosshaircolor_a 255
cl_crosshair_drawoutline 1
cl_crosshairoutline_r 0
cl_crosshairoutline_g 0
cl_crosshairoutline_b 0
cl_crosshairoutline_a 220
cl_crosshairdot 0
cl_ironsight_dot_scale 1
Fifteen of the 23 variables. The other eight are recoil, T shape, the spread limit, the four split settings and the scope dot colour switch.
What the checksum catches
One byte, again. Sum bytes 1 to 31, keep the low eight bits, store them at the front. Two other rules reject a code before the sum is even compared: the version byte has to be 1, and the height cannot be 0.
To see how much of a check that is, I mistyped the example code on purpose, exhaustively: every one of its 44 payload characters replaced by each of the 56 other characters in the alphabet. That is 2,464 codes, each exactly one keystroke away from the real one.
Six of them decoded. That is 0.24%, against the 9.6 you would predict from a checksum byte behaving like a random draw.
Five of the six described a different crosshair. The sixth decoded to the same crosshair, because the typo had landed in the unused tail and the bytes it changed added up to a multiple of 256, which the checksum cannot see. For comparison, the old format and its own one-byte check let 5 of 1,400 through.
I measured the decoder on this site, which applies the checks the open decoders describe. Whether the game's own import is stricter is not something I can read out of either of them.
In practice you copy and paste, and none of this touches you. It touches the moment somebody reads a code aloud on stream, or an OCR pass lifts one out of a screenshot, or a config file gets hand-edited. The failure mode is not a code that gets rejected, it is a code that quietly is not the one you were given.
The format before 30 September
Until that update a share code looked like CSGO-Cn37R-YE7vo-pLCAL-aURmZ-z6zkG. The format arrived with crosshair copying in the April 2020 CS:GO update, which Valve described in three sentences: as a spectator you can click a player on the scoreboard to copy their crosshair.7 No code, no layout. The old layout is known from akiver's implementation, published under MIT.6
| Old | Current | |
|---|---|---|
| Prefix | CSGO- | CS |
| Characters | 25 | 44 |
| Bytes | 18 | 32 |
| Variables | 21 | 23 |
| Sizes | tenths | pixels |
| Colour | index, RGB | RGBA |
| Outline | switch, width | mode, RGBA |
| Version | unread | must be 1 |
Twenty-five characters of base 57 are 145.8 bits and the old payload was 144, so the container was very nearly full then too. The game used it a second time for match share codes, which look identical and fill the 18 bytes with three match numbers and no checksum, covered in the match share code guide.
Read as bytes, the old example was:
69 01 f3 04 af 51 d5 89 06
1e 6d 54 0c f4 2e 00 00 00
Byte 0 was the checksum, the sum of the other seventeen bytes modulo 256. Byte 1 was never read, bytes 2 to 14 held the 21 settings, and bytes 15 to 17 were always zero. Byte 13 did four jobs at once: the style sat in bits 1 to 3, and the T shape, alpha, weapon gap and centre dot switches in the top four bits.
Of those 144 bits, 103 described a crosshair and 41 did not: eight of checksum, eight of a version byte the decoder skipped, twenty-four of zero tail and one dead bit inside byte 13.
The sizes had a quirk the current layout does not. cl_crosshairsize was one unsigned byte divided by ten, so the old format topped out at 25.5 and an encoder that went past it wrapped without a word. I encoded the same crosshair at a range of sizes and decoded each result back:
| Size going in | Size coming out |
|---|---|
| 10 | 10 |
| 25.5 | 25.5 |
| 26 | 0.4 |
| 30 | 4.4 |
| 51 | 25.4 |
A crosshair one notch over the ceiling came out sixty-five times smaller, in a code with the right length, the right alphabet and a correct checksum. That was measured on the old codec, not in the game, and a code from a generator site could carry it. What an old code's numbers mean in today's pixel units, and what this site converts, is covered in the September guide.
Reading a code somebody handed you
There is no server on the other end of a crosshair share code and nothing to look up: every setting is in the string, which is why an offline decoder can print your commands.
Paste a code into the crosshair code decoder to see those lines before you run them, particularly if it came from anywhere other than the game itself. An old code decodes into 12 console lines and a box of notes: for every style except Classic Static the tool leaves out style, size, thickness and gap, and says so.
Reading the commands is also the way to see what a code will and will not touch when you apply it: what importing a crosshair code actually changes works through the settings it rounds, and the ones it never carries at all.
Sources
Every number in this article traces to a source below. Where a claim could not be sourced, it was cut rather than softened.
- Primary sourceValve Corporation
That the format of the crosshair share code changed, that scope dot scale and colour joined the code, and that an outline colour option was added. Valve's notes give no layout.
- Primary sourceValve Corporation
That crosshair thickness and length are now in pixels where the old values were "an arbitrary scale", and that the game rescales pixel counts when the display resolution changes.
- Primary sourceSteamTracking (mirror of Valve game files)
The ranges of cl_crosshair_length, cl_crosshair_thickness and cl_crosshair_gap, the 0 to 9 cl_crosshairstyle list, the outline modes 0 to 2, and cl_crosshair_screen_height described as the resolution the user authored their size settings at, default 1080.
- Reportingsetpos.gg (open source, MIT)
That the current share code is "CS" followed by 44 characters decoding to 32 bytes, and the byte layout of those bytes. The project says it is ported from the game client of 8 October 2026. Valve has not published this layout.
- ReportingSyberiaK (open source, MIT)
30 current-format share codes with the console variables the game wrote for each, used to check the decoder on this site.
- Primary sourceValve Corporation
That Valve shipped spectator crosshair viewing and copying in April 2020, described only as clicking a player on the scoreboard to copy their crosshair, with no mention of a code or of the format behind it.
Topics
- CS2
- Crosshair
- Console Commands
- Encoding
Tools mentioned in this article
- CS2 Crosshair Code Decoder - Decode a CS2 crosshair share code into the cl_crosshair console commands of the current game. Reads the new CS... format and old CSGO- codes.
- CS2 Sensitivity Converter - Convert mouse sensitivity between CS2, Valorant, Apex and more, with eDPI and cm/360.
- CS2 Voice Comms Calculator - Hear specific players in a CS2 or FACEIT demo - upload it to auto-fill players and get the tv_listen_voice_indices commands.
- SteamID Converter - Convert between SteamID64, STEAM_0:Y:Z, SteamID3 [U:1:W], account ID and profile URL.