String to Binary

Convert a string to its binary representation.

Code

Utilities
[...str].map(c => c.charCodeAt(0).toString(2).padStart(8, '0')).join(' ');

Parameters

The string to convert to binary.

Browser·fetch() may be limited by CORS

More JavaScript Snippets