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
Base64 to Bytes
Convert a base64 encoded string to a byte array for binary data processing.
Binary to String
Convert a binary string representation to human-readable text.
Bytes to Base64
Convert a byte array to a base64 encoded string for safe text transmission.
Bytes to String
Convert a byte array to a UTF-8 encoded string using TextDecoder.
Decode Base64
Decode a Base64 encoded string back to its original text representation.
Decode URL
Decode a URL-encoded string back to its original form.