Peter's Programs

Useful utilities for your computer, by Peter Mansbach

HexDump icon


HexDump is a small Windows® program that allows you to view any file simultaneously in hexadecimal and ASCII. It also provides simple editing capabilities - insert, delete, replace, cut, copy, paste, find and replace. You can undo up to 100 editing changes. You can search for strings in either hex or ASCII, or go to a specified offset (number of bytes) in the file. Printing is supported too.

Whatever you highlight in one pane (say the hex pane) is automatically highlighted in the other pane (ASCII). HexDump uses Microsoft's MDI (Multiple Document Interface), so you can view several files at once, or have several windows open on the same file. You can resize the windows if you like.

Here is a screenshot of HexDump, with two different files open. Within each window, the left pane shows the location within the file (byte offset from the beginning, in hex), the middle pane shows the contents of the current portion of the file in hex, and the right pane shows the same contents in ASCII.

HexDump screen shot
Screenshot of HexDump

Background: I wrote this as a way to learn more about Windows programming using Microsoft Visual C++ 6. The company I worked for, Syntek Systems Corp., paid me to do this, and so the code belongs to them. But they have given me permission to distribute it freely on my web site. And now they have gone out of business.

Platform: The code runs under 32-bit and 64-bit Windows. It has been tested to varying degrees on Win98, Win2000, WinXP, Vista, Win7, and Win10. It may need 32-bit msvc DLL files, I don't know if they're a standard part of 64-bit Windows or not. Try running the program. If you don't have the right DLL files, it'll give you an error message. It will not harm your computer.

Help: Operation is very intuitive, with standard menus and a toolbar with tooltips. There were extensive help screens available within the program, but that format of help screens is no longer supported in Windows:The help screens are reproduced here, and are downloaded with the program as an HTML file viewable in your browser.

Size: The .zip file is about 170KB to download. The extracted files total about 350KB.

Installation: Download the file by clicking on the button below. Extract (unzip) the two files within it and save them in a directory of your choosing. The two files are HexDump.exe, the executable program, and HexDump.htm, the Help screen, which opens in your browser if you double-click on it. That's it. There's no installation program to run, and if you don't want to keep it, just delete the two files.

Start HexDump by double-clicking on the file. You can open files to examine by using the File/Open menu in HexDump, the Open icon in the HexDump toolbar, or by dragging a file onto HexDump. If you create a shortcut to HexDump, you can simply drag a file onto the shortcut.


Ever copy a text file from Unix to Windows, and find that it displays with no line breaks? That's because Unix ends lines with a single line-feed (LF) character, but Windows wants a carriage-return line-feed pair (CRLF). This tiny (56K) DOS program will convert the file.

Run it in a command window ("DOS window"). If you type just the name (LFtoCRLF), it will display the needed command line, which is

   LFtoCRLF inputfile outputfile

(Note to wary C programmers: if you worry that linefeeds in strings in your C code will be converted too, don't fret. They are coded as escape sequences, backslash-n, and so will not be touched.)


Rename all files in a directory matching one pattern, to another pattern. For example, if you have files named testxxx.doc (where xxx is a sequence of characters (for example, a number), different for each file), and you want the files renamed to reportxxx.doc (same xxx), run
   myrename test*.doc report*.doc

Run it with -n first, to be sure it will do what you want:
   myrename test*.doc report*.doc -n
This will list all the renames that it would do, without actually doing them.

Run it in a command window ("DOS window"). If you type just the name (myrename), it will display the needed command line formats as follows:

Usage: myrename old new
   or: myrename old new -n
        where old has a *
                and new has a * that means use what * matched in old
        or old and new are of the form *text*
                each * in new means use what the corresponding * matched in old
                (i.e. *oldtext* is renamed to *newtext*)
        the -n means print what would be done but don't do it
        You MUST be in the directory where the files are

Web Color Selector

This is a web page that opens in your browser to display many swatches of color. Hovering the mouse over a color swatch displays the hex value (for use in HTML) and the decimal RGB value (for use in specifying colors, for example in a Microsoft color selection box). A larger sample of the selected color appears at the bottom. Clicking on a swatch freezes the selection, so you can copy and paste the numbers. Clicking again (on any swatch) unfreezes the selection.

Email me
Peter's home page