Composer JSON Generator
Fill in a few fields and get a valid composer.json with authors, dependencies, PSR-4 autoloading, scripts and config.
Describe your package
Name: —
Packages: —
Size: —
How to use the Composer JSON Generator
- Enter the vendor and package name plus a short description.
- Choose the package type, license and the PHP version constraint you need.
- Add extra packages, then copy the generated composer.json into your project.
Features
- Name validation against the Composer rules
- Authors, license, type and description sections
- PSR-4 autoload mapping with your own namespace
- Scripts and config sections ready to run
Advertisement
Frequently Asked Questions
Common questions about the free online composer json generator.
It is the manifest for a PHP package managed by Composer, describing the package name,
dependencies, autoload rules and scripts.
A Composer name uses a vendor and a package part in lower case, separated by a slash, for
example acme/example-package.
PSR-4 maps a namespace prefix to a directory, so a class in the Acme Example namespace can
live in the src directory.
MIT and Apache-2.0 are permissive and common for libraries, while proprietary marks a package
that is not open source.
Development only tools such as PHPUnit, PHPStan or coding standard fixers that are not needed
in production.
It tells Composer what the package is, for example library, project, composer-plugin or
metapackage.
The generator checks the name pattern and the namespace, then reports the package count and
the size of the finished file.
Yes. Use the copy button to place the formatted JSON on your clipboard, then save it as
composer.json in the project root.
No. The file is assembled in your browser and never sent to a server.
Yes. The composer.json generator is completely free and needs no account.
Last updated: October 10, 2026