Remove/ truncate leading zeros by javascript/jquery December 31, 2022 by Tarik You can use a regular expression that matches zeroes at the beginning of the string: s = s.replace(/^0+/, '');