PHPackages                             delhombre/binary-converter - 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. delhombre/binary-converter

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

delhombre/binary-converter
==========================

A simple and efficient package to convert numbers to their binary equivalent using PHP

v1.0.2(2y ago)06MITPHPPHP &gt;=8.1.0CI failing

Since Jan 7Pushed 2y ago1 watchersCompare

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

READMEChangelogDependencies (5)Versions (6)Used By (0)

 [![BinaryConverter PHP](https://raw.githubusercontent.com/delhombre/binary-converter/main/art/example.png)](https://raw.githubusercontent.com/delhombre/binary-converter/main/art/example.png)

 [![GitHub Workflow Status (main)](https://camo.githubusercontent.com/9302ffde6ddd530393d8b0f8a7e9a3f2c8c8b26fc9f251778092a036f320f3e8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f64656c686f6d6272652f62696e6172792d636f6e7665727465722f74657374732e79616d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d726f756e642d737175617265)](https://github.com/delhombre/binary-converter/actions) [![Total Downloads](https://camo.githubusercontent.com/58f7d007b4fb2bef42fd807f0e4481a49305c4db7030d058f4cba0345018765d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64656c686f6d6272652f62696e6172792d636f6e766572746572)](https://packagist.org/packages/delhombre/binary-converter) [![Latest Version](https://camo.githubusercontent.com/9ea80e3321ae2ff3a2faf10f526dafbabea526689b948bb1a7e5c41a4f51e2c6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64656c686f6d6272652f62696e6172792d636f6e766572746572)](https://packagist.org/packages/delhombre/binary-converter) [![License](https://camo.githubusercontent.com/8ada845de16575617bdf6bfb334135042bc16a2f0d0c6dc8f9525de99d48299e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f64656c686f6d6272652f62696e6172792d636f6e766572746572)](https://packagist.org/packages/delhombre/binary-converter)

---

**BinaryConverter** is a PHP library that converts binary numbers to decimal numbers and vice versa. It also supports hexadecimal conversion.

Get Started
-----------

[](#get-started)

> **Requires [PHP 8.1+](https://php.net/releases/)**

First, install BinaryConverter via the [Composer](https://getcomposer.org/) package manager:

```
composer require delhombre/binary-converter
```

Then, interact with the package:

```
$converter = BinaryConverter::from(2024);

$bin = $converter->toBinary();

dd($bin); // "11111101000"
```

You can pass the input as a string or as an integer.

```
dd(BinaryConverter::from('2024')->toBinary()); // "11111101000"
```

But sometimes you may want to convert a binary number to a decimal number. You can do it by passing the inputType parameter like this:

```
dd(BinaryConverter::from('11111101000', 'binary')->toDecimal()); // 2024
```

---

BinaryConverter PHP is an open-sourced software licensed under the **[MIT license](https://opensource.org/licenses/MIT)**.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Every ~0 days

Total

3

Last Release

854d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2787463b6f377ecd044f9812957528ba9960df56cf1c3e50e7f603f382b5fba9?d=identicon)[delhombre](/maintainers/delhombre)

---

Top Contributors

[![delhombre](https://avatars.githubusercontent.com/u/52165447?v=4)](https://github.com/delhombre "delhombre (25 commits)")

---

Tags

phpconvertconverterdecimalbinaryhexadecimal

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/delhombre-binary-converter/health.svg)

```
[![Health](https://phpackages.com/badges/delhombre-binary-converter/health.svg)](https://phpackages.com/packages/delhombre-binary-converter)
```

###  Alternatives

[cartalyst/converter

A framework agnostic measurement conversion and formatting package featuring multiple types of measurements and currency conversion.

88434.4k7](/packages/cartalyst-converter)[yzen.dev/plain-to-class

Class-transformer to transform your dataset into a structured object

16293.9k6](/packages/yzendev-plain-to-class)

PHPackages © 2026

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