PHPackages                             dflydev/base32-crockford - 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. dflydev/base32-crockford

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

dflydev/base32-crockford
========================

Encode/decode numbers using Douglas Crockford's Base32 Encoding

v1.0.0(13y ago)14379.1k↓24.7%2[1 PRs](https://github.com/dflydev/dflydev-base32-crockford/pulls)1MITPHPPHP &gt;=5.3.2

Since Jul 14Pushed 9y ago1 watchersCompare

[ Source](https://github.com/dflydev/dflydev-base32-crockford)[ Packagist](https://packagist.org/packages/dflydev/base32-crockford)[ Docs](https://github.com/dflydev/dflydev-base32-crockford)[ RSS](/packages/dflydev-base32-crockford/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (1)

Base32 Crockford Encoder and Decoder
====================================

[](#base32-crockford-encoder-and-decoder)

A [Base32 Crockford](http://www.crockford.com/wrmg/base32.html) implementation for PHP.

Example
-------

[](#example)

```
use Dflydev\Base32\Crockford\Crockford;

$encodedValue = Crockford::encode('519571'); // FVCK
$decodedValue = Crockford::decode('FVCK'); // 519571

$encodedValue = Crockford::encodeWithChecksum('519571'); // FVCKH
$decodedValue = Crockford::decodeWithChecksum('FVCKH'); // 519571

```

By default, decoding will be lenient on the input values. This will allow for passing in the following:

```
$decodedValue = Crockford::decode('F-VCk'); // treated as: FVCK
$decodedValue = Crockford::decode('hEl1O'); // treated as: HE110

```

See [the spec](http://www.crockford.com/wrmg/base32.html) for the translation rules.

Decoding can be made strict by passing an optional second argument to the decode methods.

```
Crockford::decode('F-VCk', Crockford::NORMALIZE_ERRMODE_EXCEPTION);
Crockford::decode('hEl1O', Crockford::NORMALIZE_ERRMODE_EXCEPTION);

```

Requirements
------------

[](#requirements)

- PHP 5.3+

License
-------

[](#license)

MIT, see LICENSE.

Community
---------

[](#community)

If you have questions or want to help out, join us in the #dflydev channel on irc.freenode.net.

Not Invented Here
-----------------

[](#not-invented-here)

This is a port of [Encode::Base32::Crockford](https://github.com/gbarr/Encode-Base32-Crockford).

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

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

5056d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d6029bd16a0e8a9b97358a75b54affa6baadc1d9b0ca7eab2b6dd6c681ad7a8?d=identicon)[simensen](/maintainers/simensen)

---

Top Contributors

[![simensen](https://avatars.githubusercontent.com/u/191200?v=4)](https://github.com/simensen "simensen (7 commits)")

---

Tags

encodedecodebase32encoderdecodercrockford

### Embed Badge

![Health badge](/badges/dflydev-base32-crockford/health.svg)

```
[![Health](https://phpackages.com/badges/dflydev-base32-crockford/health.svg)](https://phpackages.com/packages/dflydev-base32-crockford)
```

###  Alternatives

[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)[sqids/sqids

Generate short YouTube-looking IDs from numbers

5781.4M33](/packages/sqids-sqids)[skleeschulte/base32

Base32 encoding and decoding class (RFC 4648, RFC 4648 extended hex, Crockford, z-base-32/Zooko).

17314.5k9](/packages/skleeschulte-base32)[torann/hashids

Laravel package for Hashids

54335.1k](/packages/torann-hashids)[delight-im/base64

Simple and convenient Base64 encoding and decoding for PHP

15158.1k6](/packages/delight-im-base64)

PHPackages © 2026

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