Convert hex string to int December 15, 2022 by Tarik It’s simply too big for an int (which is 4 bytes and signed). Use Long.parseLong("AA0F245C", 16);