PHPackages                             lessmore92/base-x - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lessmore92/base-x

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lessmore92/base-x
=================

Encode/decode any base

v1.0.4(3y ago)166.0k—3.3%21MITPHPPHP &gt;=7

Since Jan 11Pushed 3y ago1 watchersCompare

[ Source](https://github.com/lessmore92/base-x)[ Packagist](https://packagist.org/packages/lessmore92/base-x)[ RSS](/packages/lessmore92-base-x/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (1)

PHP BaseX - Any Base Encoding/Decoding
======================================

[](#php-basex---any-base-encodingdecoding)

ported from [js base-x](https://github.com/cryptocoinjs/base-x)

Installation
------------

[](#installation)

`composer require lessmore92/base-x`

Usage
-----

[](#usage)

In below sample used ripple alphabet to encode and decode ripple base58 address and seed

```
require_once 'vendor/autoload.php';

use Lessmore92\BaseX\BaseX;

$rippleAlphabet = 'rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz';
$basex          = new BaseX($rippleAlphabet);

//Ripple Address Encode/Decode
$addressDecode = $basex->decode('r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ');
var_dump($addressDecode->getHex());    // 005B812C9D57731E27A2DA8B1830195F88EF32A3B6FCBFC92D

$addressEncode = $basex->encode($addressDecode);
var_dump($addressEncode); // r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ

//Ripple Seed Encode/Decode
$seedDecode = $basex->decode('sp5fghtJtpUorTwvof1NpDXAzNwf5');
var_dump($seedDecode->getHex());    // 210102030405060708090A0B0C0D0E0F10208988A1

$seedEncode = $basex->encode($seedDecode);
var_dump($seedEncode); // sp5fghtJtpUorTwvof1NpDXAzNwf5

```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~515 days

Total

2

Last Release

1438d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1258149?v=4)[Mojtaba Bahrami](/maintainers/lessmore92)[@lessmore92](https://github.com/lessmore92)

---

Top Contributors

[![lessmore92](https://avatars.githubusercontent.com/u/1258149?v=4)](https://github.com/lessmore92 "lessmore92 (8 commits)")[![diadal](https://avatars.githubusercontent.com/u/19895516?v=4)](https://github.com/diadal "diadal (1 commits)")

---

Tags

cryptoencodingencodedecodedecodingbitcoinbasebase62rippleethereumbase58base-xcrytography

### Embed Badge

![Health badge](/badges/lessmore92-base-x/health.svg)

```
[![Health](https://phpackages.com/badges/lessmore92-base-x/health.svg)](https://phpackages.com/packages/lessmore92-base-x)
```

###  Alternatives

[ccxt/ccxt

A cryptocurrency trading API with more than 100 exchanges in JavaScript / TypeScript / Python / C# / PHP / Go

41.5k328.9k1](/packages/ccxt-ccxt)[hashids/hashids

Generate short, unique, non-sequential ids (like YouTube and Bitly) from numbers

5.4k48.6M278](/packages/hashids-hashids)[christian-riesen/base32

Base32 encoder/decoder according to RFC 4648

13331.8M61](/packages/christian-riesen-base32)[delight-im/base64

Simple and convenient Base64 encoding and decoding for PHP

15158.1k6](/packages/delight-im-base64)[ionux/phactor

Phactor is a high-performance PHP implementation of the elliptic curve math functions required to generate &amp; verify private/public (asymmetric) EC keypairs and ECDSA signatures based on secp256k1 curve parameters. This library also includes a class to generate Service Identification Numbers (SINs) based on the published Identity Protocol v1 spec.

5275.0k30](/packages/ionux-phactor)[anisimov/emoji

Allows to detect emoji, remove emoji, encode emoji and decode emoji in string.

103.7k](/packages/anisimov-emoji)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
