168

I want to edit a binary file, but I don't want to use another tool other than Visual Studio because it's a pain to switch back and forth.

Is there perhaps an add-in or some built in functionality that can do that in Visual Studio?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Kevin Driedger
  • 51,492
  • 15
  • 48
  • 55

4 Answers4

306
  1. Menu FileOpenFile
  2. Select the file to be opened
  3. On the open file dialog at the bottom there is a down arrow on the "Open" button
  4. Click "Open With..."
  5. Click "Binary Editor"
  6. Click OK

Or for the keyboard geeks out there:

  1. Ctrl + o
  2. Ctrl + v (paste filename)
  3. tab
  4. tab
  5. w
  6. b
  7. Enter
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Kevin Driedger
  • 51,492
  • 15
  • 48
  • 55
  • 30
    Loved the keyboard geeks part! – Daniel Rodriguez Nov 12 '09 at 19:08
  • 13
    +1 for the answer, but now for a rant (not against Kevin's answer, but against these controls)... Those buttons-with-options that MS uses sometimes in file open dialogs (does this control have a commonly used name?) seem like a neat idea, but from a usability perspective they don't work well. At least for me. While there's the little down-arrow indicator on the button, it still strikes me as non-discoverable since that indicator is effectively invisible. I never notice them, and from the questions I've seen where the answer is 'use that little down arrow on the button', I'm not the only one. – Michael Burr Nov 12 '09 at 19:18
  • 3
    it seems it is not available in Express edition (or maybe there is something to active in settings/options which is not enabled by default ?). – tigrou Jun 19 '12 at 16:45
  • 6
    From http://msdn.microsoft.com/en-us/library/cb4x6esf.aspx The Binary Editor is not available in Express editions. – jernkuan May 06 '14 at 18:09
  • looks like somebody forgot to put it in VS2015 Preview too :-( or maybe I just forgot to install it – Simon_Weaver Nov 19 '14 at 07:14
  • 7
    The "Binary Editor" option isn't showing up for me in VS2017 Pro. – Sam Mar 15 '17 at 04:37
  • 1
    For anyone who arrived here looking for the Binary Editor in VS2017, see the answer from @jordanbtucker. – Montgomery 'monty' Jones Feb 02 '18 at 10:45
  • If the Binary Editor refuses to open the file then make sure the file is not open in another application. – yoyo Nov 24 '20 at 00:26
12

In addition to Kevin's answer, with Visual Studio 2017 you need to have the Visual Studio C++ Core Features component installed.

Source

jordanbtucker
  • 5,768
  • 2
  • 30
  • 43
4

Another way to do it is to rename your file to .bin and drag it into VS editor

1
  1. right click the file in Solution Explorer,
  2. select 'Open With...'
  3. select 'Binary Editor'

Let's enjoy the hex world :)

enter image description here

starriet
  • 2,565
  • 22
  • 23