The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Kaitai Struct: declarative binary format parsing language

Posted by jpluimers on 2025/09/18

I don’t have words to describe how cool this tool is: [Wayback/Archive] Kaitai Struct: declarative binary format parsing language:

A new way to develop parsers for binary structures.

Declarative: describe the very structure of the data, not how you read or write it

Language-neutral: write once, use in all supported languages:

  • C++/STL
  • C#
  • Go *
  • Java
  • JavaScript
  • Lua
  • Nim *
  • Perl
  • PHP
  • Python
  • Ruby

* entry-level support

Packed with tools and samples: includes a compileran IDE, a visualizer and massive library of popular formats

Free & open source: feel free to use, modify and join the project

It’s actually not new any more as the project started in 2016, but it is versatile and complete especially for a version 0.10 (at the time of writing).

Quite a few years back I bumped into it, but back then it was not up to what I needed, like the very small set of other tools at that time, so I did a tedious manual job.

A while ago a friend asked for reverse engineering file formats, so I found it back via [Wayback/Archive] Tools to help reverse engineer binary file formats – Stack Overflow (thanks [Wayback/Archive] Mat and [Wayback/Archive] Thomas Tempelmann)

More tools from that question:

More tools via [Wayback/Archive] tools reverse engineering file formats – Google Search:

Back to Kaitai

Kaitain is hosted at GitHub and consists of a tree of repositories:

At thee time of writing, these repositories are not mentioned in the [Wayback/Archive] kaitai_struct/README.md at master · kaitai-io/kaitai_struct but are present in the repository or [Wayback/Archive] Kaitai team/organisation:

This was known: [Wayback/Archive] A few questions on the language repositories and supported languages mentioned README.md · Issue #1010 · kaitai-io/kaitai_struct and related to [Wayback/Archive] Add C++ usage example in README.md by generalmimon · Pull Request #738: issuecomment-619357771 · kaitai-io/kaitai_struct.

The Katai chosen solution was to move away from text based code examples to HTML based ones: tedious to edit, hard to get right and impossible to link to individual examples. But alas: they are in a central place now:

–jeroen

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.