forb
Binary to human, instantly. A CLI tool that automatically detects and converts data between formats.
$ forb 691E01B8
▶ hex (92% confidence)
4 bytes
→ ipv4: 105.30.1.184
→ epoch-seconds: 2025-11-19T17:43:20+00:00
≈ binary: 01101001 00011110 00000001 10111000
≈ base64: aR4BuA==
≈ int-be: 1763574200
… (8 more, use -l 0 to show all)
Conversions are sorted by usefulness - structured data (JSON, MessagePack, Protobuf) first, then semantic types (datetime, UUID, IP), then encodings. Structured data is pretty-printed with syntax highlighting.
graph LR
input(["691E01B8"])
hex["hex (92%)"]
input -->|parse| hex
hex --> ipv4["105.30.1.184"]
hex -->|int-be| epoch["2025-11-19T17:43:20Z"]
hex --> base64["aR4BuA=="]
hex --> binary["01101001..."]
Why forb?
Ever paste a blob of hex into a dozen different tools trying to figure out what it is? forb does it all at once. It tries every interpretation and shows you what makes sense.
- Hex dump from a debugger? See it as integers, timestamps, base64
- Random UUID in logs? Instantly see which version and extract the timestamp
- Timestamp that could be seconds or milliseconds? See both interpretations
- Space-separated hex bytes? Just paste them directly
Installation
Homebrew (macOS/Linux)
Scoop (Windows)
scoop bucket add mjukis https://github.com/mjukis-ab/scoop-bucket
scoop install forb
Cargo (Rust)
Debian/Ubuntu
Download the .deb from GitHub Releases, then:
From Source
# Binary is at target/release/forb
Pre-built Binaries
Download from GitHub Releases.
Usage
Direct Input
# Hex (multiple formats supported)
# Base64
# Timestamps
# UUIDs
# IP addresses
# Coordinates
# Colors
Pipe Mode
Pipe logs through forb to automatically annotate interesting values:
|
[2024-01-15 10:30:45] User 550e8400-e29b-41d4-a716-446655440000 logged in
↳ uuid: UUID v4 (random) → hex: 550E8400E29B41D4A716446655440000
[2024-01-15 10:30:46] Received payload: 69 1E 01 B8
↳ hex: 4 bytes → int-be: 1763574200, epoch: 2025-11-19T17:43:20Z
Pipe Mode Options
# Lower threshold to catch more matches (default: 0.8)
|
# Highlight matched values inline
|
# Only look for specific formats
|
# JSON output for scripting
|
Output Options
# Human-readable (default, shows top 5 conversions)
# Show more/fewer conversions
# Compact output (single-line JSON/protobuf)
# Disable colors (for piping to files)
# JSON for scripting
# Raw output (just values, for scripting)
# Show only highest-confidence interpretation
# Force specific format
# Packet layout for binary formats (protobuf, msgpack)
# List all supported formats
Graph Output
Visualize the conversion graph:
# Graphviz DOT format (pipe to dot to render)
|
# Mermaid format (renders in GitHub/GitLab markdown)
Supported Formats
| Category | Formats |
|---|---|
| Encoding | hex, base64, binary, octal, url-encoding, escape sequences (\x48, \u0048) |
| Hashing | MD5, SHA-1, SHA-256, SHA-512 (detection by length) |
| Numbers | decimal, binary, octal, data sizes (1MB, 1MiB), temperature (30°C, 86°F) |
| Math | Expression evaluation (2 + 2, 0xFF + 1, 1 << 8, 0b1010 | 0b0101) |
| Units | length, weight, volume, speed, pressure, energy, angle, area (with SI prefixes) |
| Currency | 100 USD, $50, 5kEUR, 2.5MSEK (with live exchange rates) |
| Time | Unix epoch (sec/ms), Apple/Cocoa, Windows FILETIME, ISO 8601, durations (1h30m) |
| Identifiers | UUID (v1-v8 detection), ULID (with timestamp), NanoID, CUID2, JWT |
| Network | IPv4, IPv6 |
| Coordinates | Decimal degrees, DMS, DDM, Geohash, Plus Code, UTM, MGRS, SWEREF 99 |
| Colors | #RGB, #RRGGBB, rgb(), rgba(), hsl(), hsla(), 0xAARRGGBB (Android) |
| Data | JSON, MessagePack, Protobuf (schema-less), plist (XML/binary), UTF-8 |
Hex Input Styles
forb accepts hex in many common formats:
691E01B8 Continuous
0x691E01B8 With 0x prefix
69 1E 01 B8 Space-separated (hex dumps)
69:1E:01:B8 Colon-separated (MAC address)
69-1E-01-B8 Dash-separated
0x69, 0x1E, 0x01, 0xB8 Comma-separated
{0x69, 0x1E, 0x01, 0xB8} C/C++ array style
Binary Input Styles
forb accepts binary in these formats:
0b10101010 With 0b prefix (standard)
0b1010_1010 With underscores for readability
%10101010 Assembly-style % prefix
1010 1010 Space-separated groups
Format Aliases
For quick filtering with --only, formats have short aliases:
| Format | Aliases |
|---|---|
| hex | h, x |
| binary | bin, b |
| octal | oct, o |
| base64 | b64 |
| datetime | ts, time, date |
| duration | dur, interval |
| decimal | dec, int, num |
| datasize | size, bytes, filesize |
| expr | expression, math, calc |
| escape | esc, escaped, cstring |
| uuid | guid |
| ulid | - |
| jwt | token |
| hash | md5, sha1, sha256, sha512 |
| ip | ipv4, ipv6 |
| color | col, rgb, argb, hsl |
| json | j |
| protobuf | proto, pb |
| plist | pl |
| url-encoded | url, percent |
| msgpack | mp, mpack |
| currency | cur, money |
| length | len, distance |
| weight | mass, kg, lb |
| volume | vol, liter, gallon |
| speed | velocity |
| pressure | psi, bar, atm |
| energy | joule, calorie, kwh |
| angle | deg, rad |
| area | sqft, sqm |
| temperature | temp, celsius, fahrenheit |
| coords | coordinates, gps, latlon, geo, location, dd, dms, ddm, utm, mgrs, geohash, pluscode |
Examples
Decoding Structured Data
)
{
}
With --packet mode, see the byte-level structure:
)
)
)
{
}
Debugging Binary Data
)
)
)
Identifying UUIDs
)
)
Decoding Timestamps
)
Analyzing Colors
)
) )
)
)
)
Math Expressions
)
Durations & Data Sizes
)
)
)
)
Escape Sequences
)
Currency Conversion
Exchange rates are fetched from the European Central Bank and cached locally.
)
SI prefixes work with currency for large amounts:
Ambiguous symbols show multiple interpretations:
Unit Conversions
Length, weight, volume, speed, pressure, energy, angle, and area with automatic SI prefix handling:
)
)
)
Temperature
)
)
)
)
Coordinates
Multiple coordinate formats are supported and converted automatically:
)
)
)
)
Processing Logs
|
)
How It Works
- Parse: Try all format parsers on the input
- Rank: Sort interpretations by confidence score
- Convert: For each interpretation, find all possible conversions via graph traversal
- Prioritize: Sort conversions by usefulness (structured data first, then semantic types, then encodings)
- Display: Show results with the most likely interpretation first, limited to top 5 conversions by default
Confidence score (0-100%) indicates how likely each interpretation is:
- 90%+: Strong indicators (0x prefix, UUID dashes, base64 padding)
- 70-90%: Plausible match (valid hex chars, reasonable timestamp range)
- <70%: Possible but less certain
Conversion priority - most useful conversions shown first:
- Structured data (JSON, MessagePack, Protobuf - pretty-printed with colors)
- Semantic types (datetime, UUID, IP address, color)
- Encodings (hex, base64, url-encoded)
- Raw values (integers, bytes)
Conversion kinds - shown with different symbols in CLI:
→Conversion: Actual data transformation (metric → imperial, epoch → datetime)≈Representation: Same value in different notation (256 → 0x100, 5e-9 m → 5 nm)✓Trait: Property of the value (is power-of-2, is prime)
Use -l 0 to show all conversions, or -l N to show top N.
Configuration
Settings can be configured via CLI flags, environment variables, or a config file.
Precedence: CLI args > Environment vars > Config file > Defaults
| Setting | CLI flag | Env var | Default |
|---|---|---|---|
| limit | -l, --limit |
FORB_LIMIT |
5 |
| threshold | -t, --threshold |
FORB_THRESHOLD |
0.8 |
| no_color | -C, --no-color |
FORB_NO_COLOR |
false |
| url_timeout | --url-timeout |
FORB_URL_TIMEOUT |
30 |
| url_max_size | --url-max-size |
FORB_URL_MAX_SIZE |
10M |
# Show config file location
# Generate default config file
Priority & Blocking
Customize which conversions are shown and in what order:
# ~/.config/forb/config.toml (Linux) or ~/Library/Application Support/forb/config.toml (macOS)
[]
# Reorder categories (default: Primary, Structured, Semantic, Encoding, Raw)
= ["Semantic", "Structured", "Primary", "Encoding", "Raw"]
# Adjust individual format priorities
[]
= 10 # Bump up within category
= 5 # Also bump up, but less
= -10 # Push down within category
= "Primary" # Move to different category
[]
# Never show these formats
= ["octal", "binary"]
# Block specific conversion paths
= ["hex:msgpack", "uuid:epoch-seconds"]
Use --show-paths to see blockable paths for any input:
)
Analytics
Local usage tracking helps improve forb. Enabled by default, stored in human-readable TOML.
Privacy-first design:
- No input data, filenames, or URLs are ever recorded
- Only aggregate counts: which formats are used, which features, CLI version
- Data stored locally at
~/.config/forb/analytics.toml - Disable anytime via
FORB_ANALYTICS=0or config
# View analytics status and summary
# View full analytics data
# Clear all analytics data
# Disable analytics
# Or add to config: [analytics] enabled = false
Anonymous Contribution
Optionally share aggregate usage data to help prioritize development:
# Preview what would be sent (no network call)
# Send anonymous data
What's sent: CLI version, platform, top 10 formats/conversions, feature usage counts. Fresh random ID per contribution (no cross-session tracking).
License
MIT
Contributing
Contributions welcome! See CLAUDE.md for architecture details and coding conventions.