Product summary
BinaryToSourceCode is a free desktop utility created by Noriyuki Higa that converts binary files into source-code representations. The program produces output suitable for embedding binary data into Swift or C++ projects through a straightforward graphical interface.
Typical usage flow
- Pick the target language for the generated code (Swift or C++).
- Configure how the binary will be formatted (see the detailed options below).
- Open the binary file you want to convert and let the app produce the source representation.
- Export and edit the resulting file using a plain-text editor such as Notepad++ if you need to tweak or trim lines.
- Optionally choose to embed the data as hexadecimal to discourage accidental edits.
Configuration options
- Bytes per row: choose a width between 4 and 64 to control how many bytes are shown on each line.
- Byte value range: values are expressed as 0–255, matching a single unsigned byte.
- Hex embedding: enable this to produce a hex-based representation that’s harder to modify directly.
- Output languages: select between Swift and C++ for the generated code format.
Platform and compatibility
This tool is intended primarily for macOS application development. It supports macOS Catalina and later releases; earlier versions of macOS are not supported.
Why developers find it useful
Source code that represents binary assets is useful when you want to include resources directly in a project, or when you need a readable representation of embedded data. BinaryToSourceCode streamlines creating those representations so you can integrate, inspect, or modify binary content without using a full decompiler. It’s a small, focused utility that helps when you need to translate a binary blob into source code quickly.
Technical
- Mac
- Free