I am in need of a hex editor / viewer (viewer is more important than editing, but a plus if it can edit) for Windows.
See KHexedit [1]
Requirements:
"Nice to have" features:
I've never found one that I really love. I tend to go searching every time I need one. However, I will point you toward two links:
Wikipedia: Comparison of Hex Editors
[1]
Wikibooks: Windows Hex Editors
[2]
If you have Visual Studio, you already have a Hex Editor (albeit fairly basic and without some of the features mentioned):
Source for this tip: http://stackoverflow.com/questions/1724586/can-i-hex-edit-a-file-in-visual-studio
If you already use Notepad++ there's a Hex Editor plugin [1].
[1] http://sourceforge.net/projects/npp-plugins/files/Hex%20Editor/I use HEdit [1]. I've used it for years. It's fast and free. It has most of the features you want. The version that I have is 3.0. Updated: The latest version is 3.2 and it is not free anymore. It is now $99.00.
Hex Workshop [2] has all the features you want (like Integrated Structure Viewer) but it's $90.
[1] http://www.yurisw.com/HEdit.htmgvim -b file.bin
:%!xxd
to view hex
:%!xxd -r
to convert back
UltraEdit [1] is a wicked hex editor, as is HIEW [2] (though HIEW does look like DOS, which might turn you off). Unfortunatley they're both shareware, so require a license.
If you're looking for free, you could take a gander at Cygnus [3]. It's not huge on features, but it's quick and it works.
[1] http://www.ultraedit.com/products/ultraedit.htmlI spent some time looking for a good editor a while ago and finally settled on ICY Hexplorer:
http://hexplorer.sourceforge.net/
Free/GPL and has some other "advanced" features like custom data structures, pixel view, etc.
I'm a big fan of fhred [1]. It's free and it's met most of my requirements over the years.
[1] http://frhed.sourceforge.net/Many of the above recommended hex editors (including HxD) do not meet the OP's requirements:
A free solution that does is KDE's Okteta. A Windows installer for KDE can be found here [1]. Okteta is part of the kdesdk module (KDE ≥ v4.6) or the kdeutils module (KDE < v4.6).
[1] http://windows.kde.org/I'd strongly recommend UltraEdit. It's not free (beyond the 45 day trial), but it's very very good and I don't mind paying for something I use so regularly.
Some of my favorite/most used features;
When I need a hex editor on Windows, I always reach for WinHex [1].
It's not free, but it meets all your other requirements, and does about a million other things besides.
I write and maintain software that images logical volumes under Windows, so Winhex's ability to open a physical disk or logical volume is very handy. It also has built-in decoders for common on-disk structures like NTFS MFT, MBR, etc. Building your own is easy too.
I've tried all sorts of free editors/viewers, and always come back to WinHex.
[1] http://www.x-ways.net/winhex/I can's swim in Windows without PSPad. [1]
From personal experience i can recommend 010 Editor, a very powerful hex editor. The unique feature of 010 is the ability to create templates so that you can label and find information in you hex file.
It's not my everyday hex editor, it's a bit specialized, but MadEdit is the best Unicode editor I've seen, especially when dealing with weird encodings or a file that's gotten borked via multiple encodings. And it has a hex mode which is especially good at making it obvious exactly which bytes are being interpreted as which characters. It's nothing special in hex mode if you're just editing bytes or ASCII, but it's free (GPL), fast with large files, multi-platform, and is great when you need unicode support.
You can try wxHexEditor at http://wxhexeditor.sourceforge.net
It's open sourced and work on Windows, Linux, OSX...
I write it since there is no good hex editor for huge files and/or devices on Linux. Since I use wxWidgets it works on Windows and OSX too. I am happy if you decide contribute some code...
I've always used UltraEdit but I've shifted toward Notepad++ recently
One not mentioned is Cygnus Hex Edit at http://www.softcircuits.com/cygnus/. They also have a scaled down version that is free at http://www.softcircuits.com/cygnus/fe/.
And in addition to that, I've posted about a free hex editor control with source code for MFC at http://www.blackbeltcoder.com/Articles/userctrls/mfc-hex-editor-control.
Although a lot of answers have already been provided, I would like to mention FileBrowser [1] with an integrated hex editor/viewer. The viewer and editor are separate plugins with different file handling.
From the HEX Viewer description on the website:
Chapter 1. Overview
A simple FileHandler which allows the inspection of arbitrary binary data files.
It will display the contents of the file in a hexadecimal and an ASCII form but will not load the files contents into memory. It rather always reads those bytes from the underlying file whenever it is necessary to display them.
This has the following consequences:
The viewer allows a “live” view on the opened file and will reflect changes to that files contents immediately upon redisplay.
The file is opened in read only mode which allows other processes to modify it. It will prevent the deletion of the file however.
It allows inspecting even huge files which could never be loaded into memory.
The FileHandler is a pure viewer and thus doesn't support any modification of data or saving it in any form.
From the HEX Editor description on the website:
[1] http://boarderzone.net/products/FileBrowser/en/index.htmlChapter 1. Overview
A simple FileHandler which allows editing of arbitrary binary data.
It can be used to modify the contents of any file on a byte by byte level. The files contents are fully loaded into memory and presented in a hexadecimal and ASCII table, a way very common among HEX editors.
ASCII control characters (those bytes with a value below 0x20) are displayed in a lighter color in the HEX table than other bytes. They display a tooltip text with the meaning of that byte when hovering the mouse cursor above them.
Modification of bytes is possible both in the per byte hexadecimal table as well in the ASCII line to the right of that table.
Modifying a table cell (either HEX or ASCII) will require to press either TAB or ENTER to confirm the change.
Modifying in the ASCII cell will only change those bytes whose ASCII representation has changed, thus preventing accidentially resetting non-ASCII bytes of that line.
Individual bytes can be deleted by selecting the byte to delete and pressing the according button. New bytes can be inserted at the position of the currently selected byte, thus shifting that byte (and all following content) to the end by one.
As this FileHandler supports modification and saving of the loaded data, it is an editor by nature.
In order to provide a true editor experience however, it is necessary to load the entire files contents into memory to avoid having to make changes on the underlying file when editing. For large files this might result in memory issues though.