Visualize binary data and C struct memory layouts in Obsidian
ByteGrid is an Obsidian plugin that transforms YAML definitions into beautiful, interactive SVG diagrams showing memory layouts of binary data structures.
Perfect for reverse engineering, protocol analysis, file format documentation, and understanding low-level data structures.
- ๐จ Auto Color Assignment - Fields are automatically color-coded for easy distinction
- ๐ Byte-Accurate Layouts - Precise grid-based visualization of memory structures
- ๐ Bitfield Support - Visualize individual bits within bytes
- ๐ฏ Multiple Layout Modes - Byte-level or bit-level layouts
- ๐ Color Schemes - Default, dark, and light modes
- ๐ Flexible Legend - Customizable position (left, right, bottom) and multi-column support
- ๐ Row-Major Ordering - Intuitive left-to-right field arrangement
- Open Obsidian Settings
- Go to Community Plugins and disable Safe Mode
- Click Browse and search for "ByteGrid"
- Click Install, then Enable
- Download the latest release from GitHub Releases
- Extract
main.js,manifest.json, andstyles.cssinto your vault's.obsidian/plugins/bytegrid/folder - Reload Obsidian
- Enable the plugin in Settings โ Community Plugins
Create a code block with the bytegrid language tag:
```bytegrid
name: Simple Structure
size: 16
layout: 16
fields:
- offset: 0-3
name: ID
type: uint32_t
- offset: 4-7
name: Timestamp
type: uint32_t
- offset: 8-11
name: Value
type: float
- offset: 12-15
name: Checksum
type: uint32_t
```name: Structure Name # Required: Name of the structure
size: 16 # Required: Total size in bytes
layout: 16 # Optional: Bytes per row (default: 16)
layoutUnit: byte # Optional: 'byte' or 'bit' (default: byte)
# Color Options
autoColor: true # Optional: Auto-assign colors (default: true)
colorScheme: default # Optional: 'default', 'dark', or 'light'
# Legend Options
legendPosition: right # Optional: 'right', 'left', 'bottom', 'none'
legendColumns: 1 # Optional: Number of columns in legend (default: 1)
# Other Options
showFooter: true # Optional: Show footer (default: true)
fields:
- offset: 0-3 # Required: Byte range (SSOT)
name: FieldName # Required: Field name
type: uint32_t # Required: Data type
color: blue # Optional: Explicit color
description: "..." # Optional: Description
endianness: little # Optional: 'little' or 'big'
bitfields: # Optional: Bit-level fields
- name: Flag1
bits: "0-3"
description: "..."Integer Types:
char,int8_t,uint8_tint16_t,uint16_t,shortint32_t,uint32_t,intint64_t,uint64_t,long
Floating Point:
float,double
Arrays:
char[4],uint8_t[16], etc.
Special:
reserved,padding(always gray)
When autoColor: true (default), fields cycle through these colors:
- ๐ต blue
- ๐ท cyan
- ๐ก yellow
- ๐ข green
- ๐ orange
- ๐ฃ purple
- ๐ข mint
- ๐ฉท pink
Check the examples folder for more:
- WAV audio file headers
- TCP/IP headers with bitfields
- ELF binary formats
- Unix file permissions
- CPU flags registers
# Install dependencies
npm install
# Build all packages
npm run build
# Run tests
npm run test
# Development mode (watch)
cd packages/obsidian-plugin
npm run devbytegrid/
โโโ packages/
โ โโโ core/ # Core rendering engine
โ โโโ obsidian-plugin/ # Obsidian plugin wrapper
โโโ examples/ # Example files
Contributions are welcome! Please feel free to submit a Pull Request.
- Follow Test-Driven Development (TDD)
- Write tests before implementation
- Use TypeScript strict mode
- Follow existing code style (ESLint + Prettier)
- offset is SSOT - Field size calculated from offset ranges
- No magic numbers - Use constants for layout values
- Dynamic sizing - Calculate dimensions from content
- Explicit padding - Use
reservedorpaddingtypes
MIT License - see LICENSE for details
Built with:
- Obsidian API
- js-yaml
- TypeScript & esbuild
- ๐ Report a bug
- ๐ก Request a feature
- ๐ Read the documentation
Made with โค๏ธ for the Obsidian community


