I am trying to specify a binary file format and I like to have the code generated for multiple languages, like C++, C# etc. so that file exchange works flawlessly. For that to be successful, the file format also needs to be aware of endianness.

It looks like ASN.1 has all I need. While there is a list of tools, I can hardly decide on which one to start with, so I'm asking you for recommendations. Which ASN.1 toolset have you used to successfully define a file format or protocol?


  • Editor for defining the ASN.1 syntax, ideally with syntax highlighting and squiggly lines like modern programming environments have
  • Decoding capability: Live preview of a binary file with the syntax I am editing
  • Encoding capability: Create an empty binary file and let me populate it
  • Code generation: generate C++ and C# code to read and write the file
  • gratis, not necessarily open source, but open source is preferred
  • works on Windows (10 in particular)
  • ASN.1 is to my experience mostly used in a professional environment and thus free tools are not so common. If you are not bound to ASN.1 I would recommend to first take a look onto alternatives with better free tooling support like Protobuf.
    – Robert
    Oct 19, 2022 at 21:46
  • @Robert: I'm currently looking into Protobuf. Unfortunately the C++ code doesn't compile yet :-( Oct 19, 2022 at 21:52


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy