Composer JSON Generator
Fill in your package details, add dependencies, configure autoloading and scripts, then download a ready-to-use composer.json file.
Package Info
Dependencies
Leave empty to generate without dependencies.
PSR-4 Autoload
Scripts
composer.json
{
"name": "vendor/package-name",
"description": "",
"type": "project",
"license": "MIT",
"require": {
"php": ">=8.1"
}
}
Quick-start
After downloading, run composer install in the same directory to fetch dependencies and set up autoloading.
Copied!
Summary
Fill in your package details, add dependencies, configure autoloading and scripts, then download a ready-to-use composer.json file.
How it works
- Enter your package name in vendor/package format (e.g. acme/my-app).
- Set a description, license, and minimum PHP version.
- Add dependencies by typing the package name and version constraint.
- Configure a PSR-4 autoload namespace and source directory.
- Add optional Composer scripts such as test or lint commands.
- Click Generate — preview the JSON and copy or download the file.
Use cases
- Bootstrap a new PHP library or application quickly.
- Generate a correct composer.json template when starting a project from scratch.
- Learn the proper structure of composer.json without reading full documentation.
- Add or validate version constraints before editing a real project file.
- Set up PSR-4 autoloading for a custom namespace in seconds.
- Create reproducible project scaffolding for team onboarding.
Frequently Asked Questions
Last updated: 2026-06-09 ·
Reviewed by Nham Vu