Skip to content

Instantly share code, notes, and snippets.

View aligatorr89's full-sized avatar

Rok aligatorr89

View GitHub Profile
@aligatorr89
aligatorr89 / gist:eccdd4352bf0055ca8d347c01b3044bd
Last active February 1, 2024 14:34
Convert SteamID3 to SteamID64 - Javascript
// Convert SteamID3 to SteamID64
// Use big js for precision with big numbers
const Big = require('big.js');
/*
* Example: '[U:1:927695233]' -> '76561198887960961'
* https://www.steamidfinder.com/lookup/U%3A1%3A927695233/
*/
function convertSteamId3ToSteamId64(steamId3) {
const accountId = steamId3.replace('[', '').replace(']', '').split(':')[2];