HxEditor is a powerful, native macOS hex editor built with SwiftUI. Designed for developers, security researchers, and anyone working with binary files, it combines professional-grade features with an intuitive, modern interface.
- Flexible Input Modes: Switch between ASCII and hex input (โG)
- Multi-Byte Selection: Drag to select, Shift+Arrow to extend
- Insert/Overwrite Modes: Toggle with Insert key
- Smart Operations: Copy, Cut, Paste, Duplicate, Delete, Zero Out
- Undo/Redo Support: Full undo history for all operations
- Context Menus: Right-click any byte for quick actions
- Powerful Search: Find hex patterns or ASCII/UTF-8 text (โF)
- Find & Replace: Replace single or all occurrences
- Jump to Offset: Navigate directly to any position (โJ)
- Bookmarks: Mark important locations (โB)
- Keyboard Navigation: Arrow keys with selection support
- Byte distribution histogram
- Entropy calculation
- Min/Max/Average values
- Pattern detection
- MD5, SHA-1, SHA-256, SHA-512
- CRC32 checksums
- Calculate for entire file or selection
- One-click copy to clipboard
- Extract ASCII and Unicode strings
- Configurable minimum length
- Filter by string type
- Search within results
- Click to jump to location
- Export strings to clipboard
- Side-by-Side View: Compare two files simultaneously
- Difference Highlighting: Color-coded changes (red for modifications)
- Synchronized Scrolling: Both files scroll together
- Smart Navigation: Jump between differences with โ[ and โ]
- Statistics: Total blocks, bytes changed, match percentage
- Show Only Differences: Toggle to hide matching regions
- Efficient Algorithm: Handles large files with optimized Myers diff
Export your data in multiple formats:
- C Array: Perfect for embedding in source code
- Python Bytes: Ready-to-use Python byte strings
- Base64: Web-safe encoding
- Hex Dump: Traditional hex dump format
- Raw Binary: Export selection as binary file
- Add custom tags and notes to files
- Track file analysis progress
- Color-coded priority levels
- Save metadata alongside files
- Search and filter by metadata
- Data Type Interpretation: View bytes as int8/16/32/64, float, double
- Endianness Support: Toggle between little and big endian
- String Preview: ASCII, UTF-8, and raw views
- Binary Representation: See raw binary patterns
- Selection Info: Offset, length, and statistics
- Byte Grouping: Configure display (1, 2, 4, 8, 16 bytes)
- Color Coding: Printable ASCII (blue), control chars (gray), extended (purple)
- Dual Pane View: Synchronized hex and ASCII
- Selection Highlighting: Clear visual feedback
- Native macOS Design: Full Dark Mode support
- Large File Support: Handles 10MB+ files smoothly
- Gap Buffer: Efficient data structure for editing
- Lazy Rendering: Only visible rows rendered
- Range-Based Selection: Instant selection queries
- Optimized Scrolling: Smooth even with large files
- Arrow Keys - Move cursor
- Shift+Arrows - Extend selection
- โA - Select all
- โJ - Jump to offset
- โC - Copy
- โX - Cut
- โV - Paste
- โD - Duplicate selection
- โI - Insert data
- Backspace - Delete byte
- โ0 - Zero out selection
- โZ - Undo
- โโงZ - Redo
- โG - Toggle hex input mode
- Tab - Switch hex/ASCII focus
- โF - Find
- โB - Toggle bookmark
- โ[ - Previous difference (compare mode)
- โ] - Next difference (compare mode)
- macOS 13.0 or later
- Xcode 15.0+ (for building from source)
# Open in Xcode
open HxEditor.xcodeproj
# Build and run (โR)- Open a File: Use File โ Open (โO) or drag & drop
- Edit: Click bytes to select, type to edit
- Switch Modes: Press โG for hex input mode
- Analyze: Use toolbar buttons for analysis tools
- Export: Use โE or toolbar button
- SwiftUI: Modern declarative UI framework
- CryptoKit: Native checksum calculations
- Combine: Reactive state management
- AppKit Integration: For advanced file operations
- Gap Buffer: O(1) insertion/deletion at cursor
- Range-Based Selection: O(1) selection queries
- Lazy Collections: Efficient memory usage
- Myers Diff: Industry-standard comparison algorithm
- Rolling Hash (Rabin-Karp): Fast pattern matching
- xxHash64: High-speed chunk hashing for diffs
HxEditor/
โโโ HxEditor/
โ โโโ HxEditorApp.swift # App entry point
โ โโโ ContentView.swift # Main coordinator view
โ โโโ HexGridView.swift # Hex/ASCII grid
โ โโโ HexTextView.swift # NSTextView-based renderer
โ โโโ DataBuffer.swift # Gap buffer implementation
โ โโโ HexDocument.swift # Document model
โ โโโ SearchView.swift # Find & Replace
โ โโโ ComparisonContentView.swift # File comparison UI
โ โโโ DiffEngine.swift # Diff algorithm
โ โโโ StringExtractor.swift # String extraction
โ โโโ ExportView.swift # Export formats
โ โโโ MetadataManager.swift # File metadata
โ โโโ ChecksumView.swift # Checksum calculator
โ โโโ StatisticsView.swift # File statistics
โ โโโ BookmarkManager.swift # Bookmark system
โ โโโ ...
โโโ screenshots/ # App screenshots
โโโ README.md # This file
โโโ .gitignore # Git ignore rules
Perfect for:
- ๐ง Software Developers: Debug binary formats and protocols
- ๐ Security Researchers: Analyze malware and encrypted data
- ๐ฎ Game Modders: Modify save files and game assets
- ๐พ Data Recovery: Examine corrupted files
- ๐ Reverse Engineers: Understand proprietary file formats
- ๐ Data Scientists: Analyze binary data patterns
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with SwiftUI and modern macOS frameworks
- Uses Apple's CryptoKit for cryptographic operations
- Myers diff algorithm implementation inspired by various open-source projects
Made with โค๏ธ for the macOS developer community







