Bytes to String Converter

Conversion Guide

  1. Input Your Bytes
    • Enter bytes in any supported format (auto-detected by default)
    • Formats: Hex (2 chars), Binary (8 bits), Decimal (0-255), Octal (3 digits)
    • Separators: Spaces, commas, or any non-alphanumeric characters
  2. Configuration
    • Auto-detect: Automatically determines input format
    • Strict mode: Validates input according to selected format
    • Show byte array: Displays intermediate byte values
  3. Special Cases
    • Base64: Decodes entire input as Base64 string
    • UTF-8: Properly handles multi-byte sequences
    • Invalid bytes: Shows replacement character (�) when decoding fails

Technical Details

Decoding Process

Conversion workflow:

  1. Input normalization (remove non-format characters)
  2. Format detection or manual selection
  3. Conversion to byte array (Uint8Array)
  4. UTF-8 decoding using TextDecoder
  5. Error handling for invalid sequences

Format Detection Rules

Auto-detection priority:

  • Base64: If input matches Base64 regex
  • Binary: If only 0s and 1s (length multiple of 8)
  • Hexadecimal: If only 0-9, a-f, A-F (even length)
  • Octal: If only 0-7 (length multiple of 3)
  • Decimal: Numbers 0-255 separated by non-digits

Example Conversions

Input Format Sample Input Output
Hexadecimal 48 65 6c 6c 6f 20 57 6f 72 6c 64 "Hello World"
Binary 01001000 01100101 01101100 01101100 01101111 "Hello"
Decimal 72 101 108 108 111 "Hello"
Base64 SGVsbG8gV29ybGQ= "Hello World"
Need the reverse tool? Convert String to Bytes →