Browse free open source PHP Libraries and projects below. Use the toggles on the left to filter open source PHP Libraries by OS, license, language, programming language, and project status.

  • $300 in Free Credit Towards Top Cloud Services Icon
    $300 in Free Credit Towards Top Cloud Services

    Build VMs, containers, AI, databases, storage—all in one place.

    Start your project in minutes. After credits run out, 20+ products include free monthly usage. Only pay when you're ready to scale.
    Get Started
  • Earn up to 16% annual interest with Nexo. Icon
    Earn up to 16% annual interest with Nexo.

    More flexibility. More control.

    Generate interest, access liquidity without selling, and execute trades seamlessly. All in one platform. Geographic restrictions, eligibility, and terms apply.
    Get started with Nexo.
  • 1
    Mobile Detect

    Mobile Detect

    Mobile_Detect is a lightweight PHP class for detecting mobile devices

    Mobile-Detect is a lightweight PHP library that inspects the HTTP user agent string and HTTP headers to detect whether a request comes from a mobile, tablet, or desktop device. It includes a rich set of detection rules covering device brands, operating systems, and browser engines so developers can tailor responses (views, assets, or layouts) based on client form factor. Its API is simple: isMobile(), isTablet(), or deviceFamily() methods make branching logic intuitive. The library is used in server-rendered PHP apps, CMS themes, and frameworks to serve mobile-friendly templates or redirect users to mobile versions. Because it is pattern-driven and optimized for fast matching, it adds minimal runtime overhead to request handling. By abstracting away the complexity of UA sniffing, Mobile-Detect helps teams gracefully support multi-device clients without duplicating detection logic.
    Downloads: 2 This Week
    Last Update:
    See Project
  • 2
    Proxy Manager

    Proxy Manager

    OOP Proxy wrappers/utilities to manage proxies of your objects

    This library aims to provide abstraction for generating various kinds of proxy classes. Available as part of the Tidelift Subscription. The maintainer of ocramius/proxy-manager and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. The suggested installation method is via composer. Build a lazy loadable object with ProxyManager using a Virtual Proxy.
    Downloads: 2 This Week
    Last Update:
    See Project
  • 3
    ramsey/uuid

    ramsey/uuid

    A PHP library for generating universally unique identifiers (UUIDs)

    ramsey/uuid is a PHP library for generating and working with RFC 4122 version 1, 2, 3, 4, and 5 universally unique identifiers (UUID). ramsey/uuid also supports optional and non-standard features, such as version 6 UUIDs, GUIDs, and other approaches for encoding/decoding UUIDs. A universally unique identifier, or UUID, is a 128-bit unsigned integer, usually represented as a hexadecimal string split into five groups with dashes. The most widely-known and used types of UUIDs are defined by RFC 4122. The probability of duplicating a UUID is close to zero, so they are a great choice for generating unique identifiers in distributed systems. UUIDs can also be stored in binary format, as a string of 16 bytes. The JSON extension is normally enabled by default, but it is possible to disable it. Other required extensions include PCRE and SPL. These standard extensions cannot be disabled without patching PHP’s build system and/or C sources.
    Downloads: 2 This Week
    Last Update:
    See Project
  • 4
    reCAPTCHA

    reCAPTCHA

    PHP client library for reCAPTCHA, a free service

    reCAPTCHA is Google’s human-verification system that helps websites distinguish real users from automated abuse while keeping friction low for legitimate traffic. The project bundles client and server examples, language-specific helpers, and documentation patterns for integrating reCAPTCHA v2 and v3 flows into web forms and APIs. Its design philosophy is “risk-based”: most users pass silently based on behavioral signals, while higher-risk interactions may be challenged with an image, checkbox, or other verification step. Site owners register keys, embed a small client script, and verify tokens on the server to protect actions like sign-ups, logins, and form submissions. The ecosystem supports mobile and enterprise variants, but the repo focuses on common web integrations and best practices for verifying the token securely. Deployed correctly, reCAPTCHA reduces credential stuffing, bot sign-ups, and scraping without degrading the experience for typical users.
    Downloads: 2 This Week
    Last Update:
    See Project
  • Full-stack observability with actually useful AI | Grafana Cloud Icon
    Full-stack observability with actually useful AI | Grafana Cloud

    Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

    Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
    Create free account
  • 5
    Doctrine Inflector

    Doctrine Inflector

    Small library for string manipulations to uppercase/lowercase words

    PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words. The Doctrine Inflector has methods for inflecting text. The features include pluralization, singularization, converting between camelCase and under_score and capitalizing words. Using the inflector is easy, you can create a new Doctrine\Inflector\Inflector instance by using the Doctrine\Inflector\InflectorFactory class. By default it will create an English inflector. If you want to use another language, you can do so. The supported languages are English, Spanish, French, Portuguese, Norwegian Bokmal and Turkish. If you are interested in adding support for your language, take a look at the other languages defined in the Doctrine\Inflector\Rules namespace and the tests located in Doctrine\Tests\Inflector\Rules. You can copy one of the languages and update the rules for your language.
    Downloads: 1 This Week
    Last Update:
    See Project
  • 6
    Google Translate PHP

    Google Translate PHP

    Free Google Translate API PHP Package

    A simple and effective PHP library for translating text using Google Translate without needing an API key. It allows developers to integrate real-time translation features into their applications with minimal setup and supports multiple languages, leveraging Google Translate’s unofficial endpoint.
    Downloads: 1 This Week
    Last Update:
    See Project
  • 7
    Hashids

    Hashids

    A small PHP library to generate YouTube-like IDs from numbers

    Hashids is a small open-source library that generates short, unique, non-sequential ids from numbers. It converts numbers like 347 into strings like “yr8”, or array of numbers like [27, 986] into “3kTMd”. You can also decode those ids back. This is useful in bundling several parameters into one or simply using them as short UIDs. Hashids works similarly to the way integers are converted to hex, but with a few exceptions. The alphabet is not base16, but base base62 by default. The alphabet is also shuffled based on salt. We need ids to be nice and friendly especially if they end up being in the URL. Therefore, the algorithm tries to avoid generating most common English curse words by never placing the following letters (and their uppercase equivalents) next to each other. There are no collisions because the method is based on integer to hex conversion. As long as you don't change constructor arguments midway, the generated output will stay unique to your salt.
    Downloads: 1 This Week
    Last Update:
    See Project
  • 8
    Jigsaw

    Jigsaw

    Simple static sites with Laravel’s Blade

    Jigsaw is a static site generator for PHP developers, created by Tighten. It provides a Laravel-inspired development environment for building static websites and documentation sites using Blade templates and Markdown content. Jigsaw is particularly suited for developers familiar with Laravel who want to create simple, fast, and maintainable sites.
    Downloads: 1 This Week
    Last Update:
    See Project
  • 9
    MathPHP

    MathPHP

    Powerful modern math library for PHP

    Math PHP is a library that brings advanced mathematical functions and data analysis capabilities to PHP applications. It covers a wide range of topics, including linear algebra, calculus, statistics, probability, and numerical analysis. Math PHP is designed for developers and data scientists who require precise and efficient mathematical computations in PHP, making it suitable for scientific computing and data processing.
    Downloads: 1 This Week
    Last Update:
    See Project
  • Go From AI Idea to AI App Fast Icon
    Go From AI Idea to AI App Fast

    One platform to build, fine-tune, and deploy ML models. No MLOps team required.

    Access Gemini 3 and 200+ models. Build chatbots, agents, or custom models with built-in monitoring and scaling.
    Try Free
  • 10
    Ollama-Laravel Package

    Ollama-Laravel Package

    Ollama-Laravel is a Laravel package providing seamless integration

    Ollama-Laravel Package is a PHP package designed to integrate local large language models into Laravel applications through a clean and idiomatic interface. It abstracts the Ollama API into a developer-friendly facade, allowing Laravel developers to interact with models using familiar patterns such as service containers, configuration files, and fluent method chaining. The package supports a wide range of AI capabilities including text generation, chat-based interactions, embeddings, and multimodal vision analysis, making it suitable for both simple features and complex AI-driven systems. It also includes support for reasoning models and function calling, enabling developers to build more advanced workflows where models can trigger tools or structured actions. Real-time streaming responses are supported, allowing applications to deliver incremental outputs for better user experience.
    Downloads: 1 This Week
    Last Update:
    See Project
  • 11
    Omnipay

    Omnipay

    A framework agnostic, multi-gateway payment processing library

    Omnipay is a payment processing library for PHP. It has been designed based on ideas from Active Merchant, plus experience implementing dozens of gateways for CI Merchant. It has a clear and consistent API, is fully unit tested, and even comes with an example application to get you started. You can learn one API and use it in multiple projects using different payment gateways. If you need to change payment gateways you won’t need to rewrite your code. Most official PHP payment gateway libraries are a mess. Most payment gateways have exceptionally poor documentation. So, why use Omnipay instead of a gateway’s official PHP package/example code? Because you are writing a shopping cart and need to support multiple gateways.
    Downloads: 1 This Week
    Last Update:
    See Project
  • 12
    PHP Console Color

    PHP Console Color

    Simple library for creating colored console ouput

    Simple library for creating colored console ouput. See example.php how to use this library. Just run the command "composer require php-parallel-lint/php-console-color" to install it.
    Downloads: 1 This Week
    Last Update:
    See Project
  • 13
    PHP-AMQPLib

    PHP-AMQPLib

    The most widely used PHP client for RabbitMQ

    php-amqplib is a pure PHP library for communicating with RabbitMQ, an open-source message broker. It implements the Advanced Message Queuing Protocol (AMQP) and allows developers to publish, consume, and manage messages between applications. The library is suitable for building distributed systems that require reliable message passing and is compatible with RabbitMQ and other AMQP brokers.
    Downloads: 1 This Week
    Last Update:
    See Project
  • 14
    PHP-SVG-Lib

    PHP-SVG-Lib

    SVG file parsing / rendering library

    php-svg-lib is a PHP library designed for parsing and rendering SVG files. It provides functionalities to rasterize SVG content to various surfaces, such as images or PDFs, and is utilized by projects like Dompdf for SVG rendering within PDF documents.​
    Downloads: 1 This Week
    Last Update:
    See Project
  • 15
    PhpMetrics

    PhpMetrics

    Beautiful and understandable static analysis tool for PHP

    PhpMetrics is a powerful static analysis tool for PHP code that provides metrics on code quality, complexity, maintainability, and architecture. It generates comprehensive reports in HTML format, visualizing metrics like cyclomatic complexity, lines of code, and coupling between classes. PhpMetrics helps developers identify potential code issues, optimize performance, and maintain high-quality codebases.
    Downloads: 1 This Week
    Last Update:
    See Project
  • 16
    Slug Generator Library

    Slug Generator Library

    Slug Generator Library for PHP, based on Unicode’s CLDR data

    This library provides methods to generate slugs for URLs, filenames or any other target that has a limited character set. It’s based on PHPs Transliterator class which uses the data of the CLDR to transform characters between different scripts (e.g. Cyrillic to Latin) or types (e.g. upper- to lower-case or from special characters to ASCII). There are many code snippets and some good libraries out there that create slugs, but I didn’t find anything that met my requirements. Options are often very limited which makes it hard to customize for different use cases. Some libs carry large rulesets with them that try to convert characters to ASCII, no one uses Unicode’s CLDR which is the standard for transliteration rules and many other transforms.
    Downloads: 1 This Week
    Last Update:
    See Project
  • 17
    Spatie Crawler

    Spatie Crawler

    An easy to use, powerful crawler implemented in PHP

    Spatie Crawler is a PHP library that allows developers to crawl websites and extract information efficiently. It can be used for web scraping, link checking, or automated testing of web pages. The library is simple to use and supports customizable crawling strategies, including controlling crawl depth and handling redirects. It’s suitable for building crawlers that navigate large or dynamically generated websites.
    Downloads: 1 This Week
    Last Update:
    See Project
  • 18
    Symfony Validator

    Symfony Validator

    Provides tools to validate values

    Symfony Validator is a PHP component designed to validate data structures using a flexible and extensible validation framework. It supports a wide range of built-in validation constraints and allows developers to create custom validation rules. The Validator component is commonly used for form validation, data integrity checks, and input sanitation, integrating seamlessly with Symfony applications.
    Downloads: 1 This Week
    Last Update:
    See Project
  • 19
    WhichBrowser

    WhichBrowser

    Browser sniffing gone too far — A useragent parser library for PHP

    This is an extremely complicated and almost completely useless browser-sniffing library. Useless because you shouldn't use browser sniffing. So stop right now and go read something about feature detecting instead. I'm serious. Go away. You'll thank me later. There is always an exception to the rule. There are valid reasons to do browser sniffing: to improve the user experience or to gather intelligence about which browsers are used on your website. My website is html5test.com and I wanted to know which score belongs to which browser. To do that you need a browser sniffing library. Almost all browsers say they are Netscape 5 and almost all WebKit browsers say they are based on Gecko. Even Internet Explorer 11 now no longer claims to be IE at all, but instead, an unnamed browser that is like Gecko. And it gets worse. That is why it is complicated.
    Downloads: 1 This Week
    Last Update:
    See Project
  • 20
    multiOTP open source

    multiOTP open source

    PHP strong authentication library, web interface & CLI, OATH certified

    multiOTP is a PHP class, a powerful command line utility and a web interface developed by SysCo systèmes de communication sa in order to provide a completely free and easy operating system independent server side implementation for strong two factors authentication solution. multiOTP supports hardware and software tokens with different One-Time Password algorithms like OATH/HOTP, OATH/TOTP and mOTP (Mobile-OTP). QRcode generation is also embedded in order to support provisioning of Google Authenticator software tokens. SMS code sending is currently implemented for several providers (ASPSMS, Clickatell and IntelliSMS). The data storage of the command line utility is by default flat files based in order to simplify deployment in a few minutes, but MySQL backend is supported too. multiOTP can be easily integrated in RADIUS servers like FreeRADIUS under Linux/Windows or TekRADIUS LT under Windows. multiOTP is also the engine of the credential provider multiOTP Credential Provider.
    Downloads: 19 This Week
    Last Update:
    See Project
  • 21

    PHP AutoLoad

    Extensible PSR-0 compatible class autoloader for PHP 5.3+

    The AutoLoad class allows you to use a PSR-0 compatible approach to autoloading classes using namespaces for PHP 5.3+.
    Downloads: 14 This Week
    Last Update:
    See Project
  • 22
    wxPHP

    wxPHP

    PHP bindings for the cross-platform GUI library wxWidgets.

    wxPHP is a php binding/wrapper for the cross-platform library wxWidgets, which gives you the ability to develop desktop applications using the php programming language. This applications can be executed on windows, linux and macosx using the same code base with a native look and feel. One of the ideas is that you can use your php web applications code base and logic to create native desktop applications that communicate to them transparently. This way you can give your users a seamless and native experience from the desktop while staying in sync with your web apps. There are many more use cases, but we invite you to download and try this project by your self. We hope everyone can enjoy it as much as we have enjoyed developing it.
    Downloads: 3 This Week
    Last Update:
    See Project
  • 23
    dompdf - the PHP 5 HTML to PDF converter. dompdf is a (mostly) CSS compliant HTML rendering engine written in PHP. It supports external stylesheets, inline style tags, and the style attributes of individual HTML elements. Requires PHP 5.
    Downloads: 7 This Week
    Last Update:
    See Project
  • 24
    PDFLib-free PDF creation using PHP. It has interface compatible with php pdf creator (pdf-php library). Implements most of Adobe recommended features like PageTrees, Outlines, and so on.
    Downloads: 2 This Week
    Last Update:
    See Project
  • 25
    html2pdf
    HTML2PDF is a PHP class using FPDF for the PHP4 release, and TCPDF for the PHP5 release. It can convert valid HTML and xHTML to PDF. More details and examples on http://html2pdf.fr/ HTML2PDF is now on GitHub : https://github.com/spipu/html2pdf/
    Downloads: 1 This Week
    Last Update:
    See Project
MongoDB Logo MongoDB