Edit Hex in the Browser

If you can’t stand the thought of using an application in your browser, you might as well jump ahead to the comments and start flaming.

Still with us? Imagine this scenario. You are at the office, at a client’s site, at a school, or visiting your mom. Suddenly, for some strange reason, you need to edit a hex file. We don’t know why, but if you are reading Hackaday, it isn’t that big of a stretch to imagine it. What do you do? Download and install a hex editor? Maybe you can’t. Or, if it is mom’s computer, maybe you just don’t want to. Your next option is to navigate to HexEd.it.

The application, by [Jens Duttke], uses HTML5 and JavaScript and is actually a nicely capable editor. It shows the data in hex and ASCII as you’d expect. It also shows the current cursor location in a number of formats like 8-bit integer, 32-bit integer, date and time, and more. It even shows all the representations as big endian and little endian.

The tool can scan the file to match it with almost 7,000 file types for automatic identification, and there is a very nice search feature, as well. You can hide some of the inspector formats if you like and you can export your changes to your local hard drive.

According to the site, they don’t send any of your data to their web server and they don’t use memory to store the entire file, so large file editing is possible. About the only feature we didn’t see was the ability to read and write common formats like Intel hex or Motorola S-record files. You could use a tool like srec_cat to convert those files to binary (and back), but if you could do that you could probably load a regular hex editor, too.

The design and usability of HexEd.it is good. If you are into editing binary files in your browser, you might also want to disassemble code there, too. If you are wondering what you would do with a hex editor, you probably missed this post.

27 thoughts on “Edit Hex in the Browser

  1. If it works in the Links CLI web browser and can edit local files… Then this would be very handy for those who messed up their X config or that other emergency…

    Then again… A web page that edits local files arbitrarily and outside of the knowledge of the victim could make a lethal virus.

    Still interesting seeing the evolution of such advanced webpage API’s….
    Esp virtual machines in a web page.

      1. Had a mini distro without any editor at all… or I didn’t know if it had one as there was no doc.

        Had almost a similar issue with manjaro… found out nano exists.
        There should be an easy way to Google and actually get useful info for, “CLI text editor” or, “list of console text editors for linux”… Heck, “Emergency editor for (insert distro)” didn’t produce results.

  2. Like most assembly writers, I’m lazy. So, rather than go try it out myself, you tell me…
    “…we didn’t see was the ability to read and write common formats like Intel hex…files.” Like generated by MASM, or DOS’s dbug?

    1. I am not sure I understand your question. Intel hex is a format commonly used for EPROM or microcontroller loads. Also Motorola S records depending on what you use.

    1. Troll-baiting, or flame-baiting…. but done correctly as usual.

      The idea is to gather constructive and collective comments to feed off the inspiration and help with ones’ inner-mind’s view and construction of the world.

      Brian Benchoff uses a blown out of proportion variant of this technique (Likely intending to shoo us remaining readers away).
      To such an extent, he wrote an article about how plagiarism gets people places… i.e. into the hackaday prize in a newsworthy manner. In this case, if he wrote about evicting said plagiarist from the prize for blatant plagiarism… Then no harm done and we can all discuss constructively: Without trolling.

  3. Cool find :) I was actually wanting one the other day but for game cheats (nothing hardcore useful haha) so this will be fun to give a shot. Keep it up HaD-some good links recently. Much appreciated :)

  4. > scan the file to match it with almost 7,000 file types for automatic identification

    pretty basic, very primitive binary matching, couldnt recognize DLL.

    >According to the site, they don’t send any of your data to their web server

    nice, means it should work offline = I can just grab all the js and save it locally for later

    1. I’m literally amazed at the number of people who, trying to make a point in a clever fashion, say something without ever considering that what they just said can also be used against them.

      “Unfortunately for most of you, the browser is the new OS. (sent from a ChromeOS Pixel 2.)”

      No, unfortunate for you. That’s all you’ve got, A NON-COMPUTER. You’ve got only a terminal –with a browser– which can’t even print properly, and must be continually attached to the internet or you don’t “work”…oh, and a massive inferiority complex.

      “To a person whose only tool is a hammer, every problem is a nail.”–anon

      “I won’t insult your intelligence by suggesting that you believe what you just said.”–Wm. F. Buckley

  5. This is not a hex editor. It’s a binary editor. It can’t handle Intel-Hex files, Motorola S, etc. Also it can’t handle gaps. Don’t call a program hex editor if it does not have such features. I have not seen a usable Hex-Editor which can handle gaps so far.

    1. How silly. It displays and accepts input in hex. Hex represents binary. It is not a binary editor. By your logic Microsoft Word isn’t a document editor because documents use LaTex and Word can’t open them.

      If you have a hex file (or srecord file) with (or without) gaps, use srec_cat to build a file with no gaps (or convert to binary with no gaps). Then after editing with anything (including this editor) use srec_cat to put it back. Ideal? No, but I use the same trick to make the open source TL886 EPROM programmer read hex files (and contributed it back to the project).

      1. I used srec_cat a lot back in the days. How do you preserve the gaps when converting back? Doing this manually is pain in the ass and if you have automated processes you can’t tell anymore which data was filled, and which was entered but has the same value. How do you handle files which have huge memory gaps, like 4 GB or greater? There are microcontroller which use 64-bit address space these days. Very much fun converting this to binary. It’s a pitty that there’s not a single editor on the market which actually handles that gap shit. That’s why my company had to design its own editor besides a memory efficient file format, because – guess it – Intel-Hex, MotS is not even near memory efficient.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s