PHPackages                             chx2/steamidparser - 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. chx2/steamidparser

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

chx2/steamidparser
==================

A PHP class to convert Steam Profile URLS to SteamID, Community, and UserID's

010[1 issues](https://github.com/chx2/Parse-Steam-URL-Class/issues)PHP

Since Jan 19Pushed 5y agoCompare

[ Source](https://github.com/chx2/Parse-Steam-URL-Class)[ Packagist](https://packagist.org/packages/chx2/steamidparser)[ RSS](/packages/chx2-steamidparser/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Parse-Steam-URL-Class
=====================

[](#parse-steam-url-class)

A single PHP class meant to handle the utility of dealing with the conversion between SteamID formats.

Why use this?
-------------

[](#why-use-this)

If you want to parse a steam URL without importing an entire library to do so, this is a simple snippet that will return CommunityID, SteamID, UserID, and Profile Thumbnail as an easy-to-reference array of values.

### Requirements

[](#requirements)

If you wish to use the `resolveVanity()` or `toAvatar()` functions, you will need to input a Steam WebAPI Key. Learn more @

Install
-------

[](#install)

You can utilize the source code one of two ways:

1. Use composer in your project folder

```
composer require chx2/steamidparser

```

2. Copy `steamid.class.php` from the src/ directory of the repo directly into the location of your choice in your project

#### Usage

[](#usage)

To use this, you will need to provide an input to convert as well your SteamWebAPI Key. For example:

```
require __DIR__ . '/vendor/autoload.php';
$id = new SteamID($input,$api_key);
```

So if I were to pass my own custom steam url, through the function, if I want to convert this custom URL to a SteamID, I would do the following:

```
if ($id->resolveVanity()) {
  $communityid = $id->toCommunityID();
  $steamid = $id->toSteamID();
  $userid = '[U:1:'.$id->toUserID().']';
}
```

#### Functions List

[](#functions-list)

Function NameReturnsisID32()Determine if an input ID is in ID32 format.isID64()Determine if an input ID is in ID64 format.resolveVanity()Determine if a vanity url is valid.toAvatar()Return a profile image for the given SteamID.toCommunityID()Convert the current ID instance to ID64 format.toSteamID()Convert the current ID instance to ID32 format.toUserID()Convert the current ID instance to UserID format.toArray()Convert the current ID instance to an array of all class returned formats.##### Final note:

[](#final-note)

This file uses id conversion functions by

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4dfe83cd01bb853340406f94efc67e996c4fd5c8ea180501d674246e7df03eeb?d=identicon)[chx2](/maintainers/chx2)

---

Top Contributors

[![chx2](https://avatars.githubusercontent.com/u/24723492?v=4)](https://github.com/chx2 "chx2 (15 commits)")

### Embed Badge

![Health badge](/badges/chx2-steamidparser/health.svg)

```
[![Health](https://phpackages.com/badges/chx2-steamidparser/health.svg)](https://phpackages.com/packages/chx2-steamidparser)
```

###  Alternatives

[omaressaouaf/laravel-id-generator

Generate custom incremental unique ids for Laravel

566.3k](/packages/omaressaouaf-laravel-id-generator)[infuse/libs

Solid libraries for rapid PHP development

1444.0k3](/packages/infuse-libs)[gussrw/laravel-routes

Documentation of Laravel Routes

1210.5k](/packages/gussrw-laravel-routes)

PHPackages © 2026

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