Is there a way to read binary data in JavaScript? May 26, 2023 by Tarik You can use parseInt: var bin = parseInt('10101010', 2); The second argument (the radix) is the base of the input.