We compress 256-bit blockchain IDs into 3-character URLs using shortest-prefix detection and base62 encoding.
Our two-stage algorithm finds the shortest unique hexadecimal prefix for each ID, then compresses it to base62. This creates URLs like i7n.xyz/9LE that are 95% shorter than full blockchain identifiers while maintaining perfect uniqueness through creation-date sorting.
Intuition protocol uses 256-bit hexadecimal identifiers for atoms, triples, and lists. These IDs are 64 characters long, making them impractical for sharing on social media or messaging platforms.
0x8c486fd3377cef67861f7137bcc89b188c7f1781314e393e22c1fa6fa24e520eOur solution: A two-stage algorithm that achieves ~95% compression while maintaining uniqueness and readability.
Instead of using the full 64-character ID, we find the shortest prefix that uniquely identifies the term in the Intuition database.
Full ID: 0x8c486fd3377cef67861f7137bcc89b188c7f1781314e393e22c1fa6fa24e520eShortest: 0x8c48The algorithm uses smart collision detection: it starts with a 2-character prefix and increments by 2 until it finds a unique match. Most terms need only 4-8 characters.
When multiple terms share the same starting characters, the system uses creation date sorting to determine which term gets the shorter ID. Terms are sorted by when they were created (oldest first), ensuring:
// Example collision scenarioTerm A (created Jan 1, 2024): 0x8c486fd3377cef67861f7137bcc89b188c7f1781...Term B (created Feb 15, 2024): 0x8c489a2b5d8e1f47c2d3b8f4e9a1c5d7f2b6a4e8... ^ Differ at position 5Short ID for Term A: 0x8c486f → 9LKx (6 chars)Short ID for Term B: 0x8c489a → 9LMp (6 chars)If you try to shorten a newer term that shares a prefix with an older term, the algorithm will detect the collision and return a longer prefix to ensure the URL uniquely identifies the correct term.
We convert the shortest hex prefix to base62 (using 0-9, A-Z, a-z) for maximum URL density.
Hex: 0x8c48 (4 characters)Base62: 9LE (3 characters)Base62 uses the full alphanumeric character set, resulting in shorter URLs that are still easy to read and share.
Lists use two short IDs (predicate and object) separated by a slash
Understanding the exact mechanics of prefix finding and collision resolution helps explain why some URLs are shorter than others.
Start with shortest prefix (2 characters)
Extract first 2 hex characters after "0x" (e.g., 0x8c)
Query database with wildcard
Search for all IDs matching 0x8c% (LIKE operator)
Results are sorted by created_at: asc (oldest first)
Check first result
If first result matches your target ID → Success! Use this prefix
Handle collision (first result is different)
Compare character-by-character to find where they differ
Jump directly to the needed prefix length (smart optimization)
Repeat until unique
Continue with longer prefixes until finding one that uniquely identifies your term as the first result
Your term: 0x8c486fd3377cef67861f7137bcc89b188c7f1781314e393e22c1fa6fa24e520e0x8c% → Returns 5 results, first one is 0x8c48... (different term)0x8c48% → Returns 1 result matching your termResult: 0x8c48 (4 characters)Base62: 9LE (3 characters)Final URL: i7n.xyz/9LEOlder term (Jan 2024): 0x7a3b9c2d8f1e4a6b5c9d2e8f1a3b7c4d9e2f8a1b6c3d7e9f2a5b8c1d4e7f9a2bYour term (Mar 2024): 0x7a3b9c5a1f2e3d4c5b6a7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a ^ Differ at position 70x7a% → Returns older term first (created earlier)0x7a3b9c2d% → Older term still appears first0x7a3b9c5a% → Your term appears first!Result: 0x7a3b9c5a (8 characters)Base62: 2Gf9Jm (6 characters)Final URL: i7n.xyz/2Gf9JmOlder term (Feb 2024): 0xa1739235f5a8362b15268eab46484abdd7660a1e2a6a5d7deacbed9d4c055e68Your term (Apr 2024): 0xa1739235f5a8362b15268fab72b9c3d5e8f1a2b6c4d7e9f3a5b8c2d6e1f4a7b9c ^ Differ at position 260xa1% → Older term appears first0xa1739235f5a8362b15268f prefix → Your term appears first!Result: 0xa1739235f5a8362b15268f (26 chars)Base62: 7kNmQxDwFpHr (12 characters)Final URL: i7n.xyz/7kNmQxDwFpHrThe length of your shortened URL depends on when your term was created and how similar its ID is to older terms. This is why:
Beyond just shortening URLs, our service optimizes links for social media sharing:
This approach offers several important benefits:
In addition to the web interface, we provide REST API endpoints for programmatic access. These endpoints return shortened URLs as plain text, making them ideal for integration with other services and automation workflows.
GET /api/short/term/:termIdAccepts hex IDs (full or partial) or base62 IDs. Returns the shortened URL as plain text.
curl i7n.xyz/api/short/term/0x8c486fd3377cef67861f7137bcc89b188c7f1781314e393e22c1fa6fa24e520ei7n.xyz/9LEGET /api/short/list/:predicateTermId/:objectTermIdAccepts hex IDs or base62 IDs for both the predicate and object terms.
curl i7n.xyz/api/short/list/0x7ec36d201c842dc787b45cb5bb753bea4cf849be3908fb1b0a7d067c3c3cc1f5/0x8ed4f8de1491e074fa188b5c679ee45c657e0802c186e3bb45a4d3f3faa6d426i7n.xyz/8RP/9VkAPI Features: Format detection, plain text response, error handling, and parallel processing for optimal performance.
Experience the compression in action by shortening your own Intuition URLs.