A simple React web app that lets you upload or drag & drop any file and view its contents in hexadecimal and ASCII format. The project supports dark mode, is fully tested with Vitest, and can be easily deployed to GitHub Pages.
- Hex Viewer: Displays the hex bytes of a file alongside their ASCII representation, 16 bytes per row.
- Drag & Drop or Upload: Easily load files via file input or drag & drop.
- Dark Mode: Toggle between light and dark modes for better readability.
- Clean and Intuitive UI: Hex and ASCII columns are styled for clarity.
- Responsive Design: Works well on desktop and tablet screens.
The live demo is deployed here:
To run the app locally:
- Clone the repository:
git clone https://github.com/doctorlai/hex-viewer.git
cd hex-viewer- Install dependencies:
npm install- Start the development server:
npm run dev- Run tests:
## or: npm test
npm run test- Test Coverage:
npm run coverage- Format code:
npm run format # Check formatting
npm run format:fix # Automatically fix formatting- Open http://localhost:5173/ in your browser.
- Upload a file or drag & drop it into the app.
- View the file’s hexadecimal bytes and ASCII representation side by side.
- Toggle Light/Dark Mode using the 🌞/🌙 button.
- Scroll to explore the full file content.
Contributions are welcome!
- Fork the repository.
- Create a feature branch:
git checkout -b feature-branch- Commit your changes:
git commit -am 'Add new feature'- Push to your fork:
git push origin feature-branch- Open a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
AI generated document can be found here