Skip to content

luongvantam/bin2txt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

bin2txt

bin2txt is a lightweight utility for converting between binary files (.bin) and human-readable text (.txt) in hexadecimal representation (16 bytes per line).
It also provides ASCII text → binary conversion for convenience.


Features

  • bin2txt: Convert binary file -> text file (hex dump, 16 bytes per line).
  • txt2bin-hex: Convert hex text file -> binary file.
  • txt2bin-ascii: Convert ASCII text -> binary file (UTF-8 encoded).

Requirements

  • Python 3.6+
  • No external dependencies

Installation

Clone this repository and make the script executable:

git clone https://github.com/luongvantam/bin2txt.git
cd bin2txt
chmod +x main.py

Usage

1. Binary -> Text (hex)

python3 main.py bin2txt input.bin

2. Text (hex) -> Binary

python3 main.py txt2bin-hex input.txt

3. Text (ASCII) -> Binary

python3 main.py txt2bin-ascii input.txt

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Languages