PHPackages                             smart-lib/base-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. smart-lib/base-converter

ActiveLibrary

smart-lib/base-converter
========================

Convert numbers between any base you want, including negative numbers and floating point numbers

v1.2.0(4y ago)011GPL-3.0-onlyPHPPHP &gt;=7.1.0

Since Aug 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/smart-lib/base-converter)[ Packagist](https://packagist.org/packages/smart-lib/base-converter)[ Docs](https://github.com/smart-lib/base-converter)[ RSS](/packages/smart-lib-base-converter/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (5)Dependencies (1)Versions (5)Used By (0)

BaseConverter
=============

[](#baseconverter)

Convert numbers between any base you want, including negative numbers and floating point numbers

- Including default bases from 2 to 64 symbols
- Convert from and to custom charset
- Convert negative numbers
- Convert floating point numbers(with delimiter, without exponent)
- Customize minus sign and float delimiter

Install
-------

[](#install)

Via Composer

```
$ composer require smart-lib/base-converter
```

Usage
-----

[](#usage)

### Simple:

[](#simple)

```
$converter = new SmartLib/BaseConverter();
echo $converter->convert('100500', 10, 36);
echo $converter->convert('-100500', 10, 36);
echo $converter->convert('100500.99', 10, 64);
```

### Custom charset:

[](#custom-charset)

```
$converter = new SmartLib/BaseConverter();
echo $converter
    ->from(10)
    ->to(6, 'QWERTY')
    ->convert('100500', 10, 6);
```

### Change delimiter, change minus sign:

[](#change-delimiter-change-minus-sign)

```
$converter = new SmartLib/BaseConverter();
echo $converter
    ->from(10)
    ->to(36, null, ',', '~')
    ->convert('-100.500', 10, 36);
```

Testing
-------

[](#testing)

```
$ phpunit
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/smart-lib/base-converter/blob/master/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Vladimir Golubev](https://github.com/WladySpb)
- [All Contributors](https://github.com/smart-lib/base-converter/contributors)

License
-------

[](#license)

The GPL-3.0 License. Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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 ~134 days

Total

4

Last Release

1705d ago

Major Versions

v0.1.1-alpha → v1.1.02020-08-20

PHP version history (2 changes)v0.1-alphaPHP &gt;=7.0.0

v1.1.0PHP &gt;=7.1.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11596459?v=4)[Vladimir Golubev](/maintainers/WladySpb)[@WladySpb](https://github.com/WladySpb)

---

Top Contributors

[![WladySpb](https://avatars.githubusercontent.com/u/11596459?v=4)](https://github.com/WladySpb "WladySpb (35 commits)")

---

Tags

converternumbers

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/smart-lib-base-converter/health.svg)

```
[![Health](https://phpackages.com/badges/smart-lib-base-converter/health.svg)](https://phpackages.com/packages/smart-lib-base-converter)
```

###  Alternatives

[mark-gerarts/auto-mapper-plus

An AutoMapper for PHP

5623.2M21](/packages/mark-gerarts-auto-mapper-plus)[kwn/number-to-words

Multi language standalone PHP number to words converter. Fully tested, open for extensions and new languages.

4235.0M21](/packages/kwn-number-to-words)[iamcal/php-emoji

This is a PHP library for dealing with Emoji, allowing you to convert between various native formats and displaying them using HTML.

1.3k481.1k](/packages/iamcal-php-emoji)[matthiasmullie/path-converter

Relative path converter

10229.6M7](/packages/matthiasmullie-path-converter)[goetas-webservices/xsd2php

Convert XSD (XML Schema) definitions into PHP classes and JMS metadata

2411.6M37](/packages/goetas-webservices-xsd2php)[ncjoes/office-converter

PHP Wrapper for LibreOffice

2431.2M4](/packages/ncjoes-office-converter)

PHPackages © 2026

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