PHPackages                             brtnetwork/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. brtnetwork/base-x

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

brtnetwork/base-x
=================

Encode/decode any base

1.0.0(5y ago)0561MITPHPPHP &gt;=7

Since Mar 6Pushed 5y agoCompare

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

READMEChangelog (1)Dependencies (1)Versions (2)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 brtnetwork/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 BRTNetwork\BaseX\BaseX;

$brtAlphabet = 'brtshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2pcdeCg65jkm8oFqi1uvAxyz';
$basex          = new BaseX($brtAlphabet);

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

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

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

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

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.8% 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

Unknown

Total

1

Last Release

1897d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/79250856?v=4)[BRT Network](/maintainers/BRTNetwork)[@BRTNetwork](https://github.com/BRTNetwork)

---

Top Contributors

[![lessmore92](https://avatars.githubusercontent.com/u/1258149?v=4)](https://github.com/lessmore92 "lessmore92 (7 commits)")[![donhardman](https://avatars.githubusercontent.com/u/59067742?v=4)](https://github.com/donhardman "donhardman (2 commits)")

---

Tags

cryptoencodingencodedecodedecodingbitcoinbasebase62ethereumbase58base-xcrytographybrtbrtnetwork

### Embed Badge

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

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

###  Alternatives

[hashids/hashids

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

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

Base32 encoder/decoder according to RFC 4648

13331.8M61](/packages/christian-riesen-base32)[sqids/sqids

Generate short YouTube-looking IDs from numbers

5781.4M33](/packages/sqids-sqids)[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)
