# ImHex | A Hex Editor For Reverse Engineers & Programmers

**URL:** <https://onehack.st/t/imhex-a-hex-editor-for-reverse-engineers-programmers/170240>\
**Category:** Tools & Scripts\
**Tags:** tools\
**Created:** [January 18, 2021, 12:46pm UTC](https://onehack.st/t/imhex-a-hex-editor-for-reverse-engineers-programmers/170240 "2021-01-18T12:46:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PlayBoy83](https://onehack.st/user_avatar/onehack.st/playboy83/32/164314_2.png) [@PlayBoy83](https://onehack.st/u/PlayBoy83)\
**Post date:** [January 18, 2021, 12:46pm UTC](https://onehack.st/t/imhex-a-hex-editor-for-reverse-engineers-programmers/170240/1 "2021-01-18T12:46:19Z")

</div>

![image](https://onehack.st/uploads/default/original/3X/2/a/2a6710aa3ec83b913f70ee6f3e2048f308cbd4c6.png)

# 🔍 ImHex

A Hex Editor for Reverse Engineers, Programmers and people that value their eye sight when working at 3 AM.

[!['Build' workflow Status](https://camo.githubusercontent.com/a6bfcf04dadccb2ec4a938243ab0d246a562c139057875ea4032bf62599c66c2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f576572576f6c762f496d4865782f4275696c643f6c6f6e6743616368653d74727565267374796c653d666f722d7468652d6261646765266c6162656c3d4275696c64266c6f676f436f6c6f723d666666266c6f676f3d476974487562253230416374696f6e73)](https://github.com/WerWolv/ImHex/actions?query=workflow%3ABuild) [![Discord Server](https://camo.githubusercontent.com/e749c4328ea570b8e04225bd3082d58e902896f263cb1a290645bbe4ec6a77ec/68747470733a2f2f696d672e736869656c64732e696f2f646973636f72642f3738393833333431383633313637353935343f6c6162656c3d446973636f7264266c6f676f3d446973636f7264267374796c653d666f722d7468652d6261646765)](https://discord.gg/X63jZ36xBY)

## Supporting

If you like my work, please consider supporting me on GitHub Sponsors, Patreon or PayPal. Thanks a lot!

[![GitHub donate button](https://camo.githubusercontent.com/ae6e0528466ea8adb868de86dd715a3fae928ac70400f3f639e88da6f154290a/68747470733a2f2f776572776f6c762e6e65742f6173736574732f6769746875625f62616e6e65722e706e67) ](https://github.com/sponsors/WerWolv)[![Patreon donate button](https://camo.githubusercontent.com/2b7105015397da52617ce6775a339b0b99d689d6f644c2ce911c5d472362bcbd/68747470733a2f2f63352e70617472656f6e2e636f6d2f65787465726e616c2f6c6f676f2f6265636f6d655f615f706174726f6e5f627574746f6e2e706e67) ](https://www.patreon.com/werwolv)[![PayPal donate button](https://camo.githubusercontent.com/c47d9e6a5d7151a7954af8838b83ac7447ceeb933ef9498ac0fef03183cc9499/68747470733a2f2f776572776f6c762e6e65742f6173736574732f70617970616c5f62616e6e65722e706e67)](https://werwolv.net/donate)

## Features

- Featureful hex view
  - Byte patching
  - Patch management
  - Copy bytes as feature
    - Bytes
    - Hex string
    - C, C++, C#, Rust, Python, Java & JavaScript array
    - ASCII-Art hex view
    - HTML self contained div

  - String and hex search
  - Colorful highlighting
  - Goto from start, end and current cursor position

- Custom C+±like pattern language for parsing highlighting a file’s content
  - Automatic loading based on MIME type
  - arrays, pointers, structs, unions, enums, bitfields, using declarations, little and big endian support, conditionals and much more!
  - Useful error messages, syntax highlighting and error marking

- Data importing
  - Base64 files
  - IPS and IPS32 patches

- Data exporting
  - IPS and IPS32 patches

- Data inspector allowing interpretation of data as many different types (little and big endian)
- Huge file support with fast and efficient loading
- String search
  - Copying of strings
  - Copying of demangled strings

- File hashing support
  - CRC16 and CRC32 with custom initial values and polynomials
  - MD4, MD5
  - SHA-1, SHA-224, SHA-256, SHA-384, SHA-512

- Disassembler supporting many different architectures
  - ARM32 (ARM, Thumb, Cortex-M, AArch32)
  - ARM64
  - MIPS (MIPS32, MIPS64, MIPS32R6, Micro)
  - x86 (16-bit, 32-bit, 64-bit)
  - PowerPC (32-bit, 64-bit)
  - SPARC
  - IBM SystemZ
  - xCORE
  - M68K
  - TMS320C64X
  - M680X
  - Ethereum

- Bookmarks
  - Region highlighting
  - Comments

- Data Analyzer
  - File magic-based file parser and MIME type database
  - Byte distribution graph
  - Entropy graph
  - Highest and avarage entropy
  - Encrypted / Compressed file detection

- Helpful tools
  - Itanium and MSVC demangler
  - ASCII table
  - Regex replacer
  - Mathematical expression evaluator (Calculator)
  - Hexadecimal Color picker

- Built-in cheat sheet for pattern language and Math evaluator
- Doesn’t burn out your retinas when used in late-night sessions

## Screenshots

[![](https://camo.githubusercontent.com/b97a81829a15feb3535e8d7221dd28d205c9d644856f649ed193b697b80a7e4f/68747470733a2f2f692e696d6775722e636f6d2f784837784a34672e706e67)](https://camo.githubusercontent.com/b97a81829a15feb3535e8d7221dd28d205c9d644856f649ed193b697b80a7e4f/68747470733a2f2f692e696d6775722e636f6d2f784837784a34672e706e67) [![](https://camo.githubusercontent.com/c51d8223183041e2f1ca8e9565d4f7b31e7756fc0e232e5bcb35b539d97a0991/68747470733a2f2f692e696d6775722e636f6d2f6668564a5945612e706e67)](https://camo.githubusercontent.com/c51d8223183041e2f1ca8e9565d4f7b31e7756fc0e232e5bcb35b539d97a0991/68747470733a2f2f692e696d6775722e636f6d2f6668564a5945612e706e67)

## Pattern Language

The custom C-like Pattern Language developed and used by ImHex is easy to read, understand and learn. A guide with all features of the langauge can be found [in the wiki](https://github.com/WerWolv/ImHex/wiki/Pattern-Language-Guide) or a simpler version in ImHex under `Help -> Pattern Language Cheat Sheet`

## Additional Files

For format patterns, includable libraries and magic files, check out the [ImHex-Patterns](https://github.com/WerWolv/ImHex-Patterns) repository. Feel free to PR your own files there as well!

## Nightly builds

See latest nightly builds on the artifacts result of the Build action [here](https://github.com/WerWolv/ImHex/actions?query=workflow%3ABuild).

NOTE: **We currently only provide nightly builds for macOS (x86\_64)**

## Compiling

You need a C++20 compatible compiler such as GCC 10.2.0 to compile ImHex. Moreover, the following dependencies are needed for compiling ImHex:

- GLFW3
- libmagic, libgnurx, libtre, libintl, libiconv
- libcrypto
- capstone
- nlohmann json
- Python3
- freetype2
- Brew (macOS only)

### Windows and Linux

Find all-in-one dependency installation scripts for Arch Linux, Fedora, Debian/Ubuntu and/or MSYS2 in [dist](https://github.com/WerWolv/ImHex/blob/master/dist).

After all the dependencies are installed, run the following commands to build ImHex:

mkdir build cd build cmake -DCMAKE\_BUILD\_TYPE=Release .. make -j

To create a standalone zipfile on Windows, get the Python standard library (e.g. from [https://github.com/python/cpython/tree/master/Lib](https://github.com/python/cpython/tree/master/Lib)) and place the files and folders in `lib/python3.8` next to your built executable. Don’t forget to also copy the `libpython3.8.dll` and `libwinpthread-1.dll` from your mingw setup next to the executable.

On both Windows and Linux:

- Copy the files from `python_libs` in the `lib` folder next to your built executable.
- Place your magic databases in the `magic` folder next to your built executable
- Place your patterns in the `pattern` folder next to your built executable
- Place your include pattern files in the `include` folder next to your built executable

### macOS

To build ImHex on macOS, run the following commands:

brew bundle --no-lock --file dist/Brewfile mkdir build cd build CC=$(brew --prefix llvm)/bin/clang CXX=$(brew --prefix llvm)/bin/clang++ PKG\_CONFIG\_PATH=“$(brew --prefix openssl)/lib/pkgconfig”:“$(brew --prefix)/lib/pkgconfig” cmake -DCMAKE\_BUILD\_TYPE=Release .. make -j

## Credits

- Thanks a lot to ocornut for their amazing [Dear ImGui](https://github.com/ocornut/imgui) which is used for building the entire interface
  - Thanks to orconut as well for their hex editor view used as base for this project.
  - Thanks to BalazsJako for their incredible [ImGuiColorTextEdit](https://github.com/BalazsJako/ImGuiColorTextEdit) used for the pattern language syntax highlighting
  - Thanks to AirGuanZ for their amazing [imgui-filebrowser](https://github.com/AirGuanZ/imgui-filebrowser) used for loading and saving files

- Thanks to nlohmann for their [json](https://github.com/nlohmann/json) library used for project files
- Thanks to aquynh for [capstone](https://github.com/aquynh/capstone) which is the base of the disassembly window

## GitHub:

> **[GitHub - WerWolv/ImHex: 🔍 A Hex Editor for Reverse Engineers, Programmers...](https://github.com/WerWolv/ImHex)**
>
> 🔍 A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.
