Skip to content

Instantly share code, notes, and snippets.

@lorishui
Created July 15, 2026 16:49
Show Gist options
  • Select an option

  • Save lorishui/d318b540e474c8836fb48f197a7f56b8 to your computer and use it in GitHub Desktop.

Select an option

Save lorishui/d318b540e474c8836fb48f197a7f56b8 to your computer and use it in GitHub Desktop.
Binary translator test cases

Binary Translator Test Cases

Reference tool: https://jsontotable.net/binary-translator

Use these test cases when validating a binary-to-text or text-to-binary converter.

[
  {
    "text": "Hello",
    "binary": "01001000 01100101 01101100 01101100 01101111"
  },
  {
    "text": "JSON",
    "binary": "01001010 01010011 01001111 01001110"
  },
  {
    "text": "API",
    "binary": "01000001 01010000 01001001"
  },
  {
    "text": "data",
    "binary": "01100100 01100001 01110100 01100001"
  }
]

Validation checklist:

  • Reject binary chunks that are not 8 bits long.
  • Ignore extra whitespace between bytes.
  • Preserve UTF-8 characters when encoding text.
  • Show clear errors for malformed binary input.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment