PHP Formatter
Format and beautify PHP code with PSR-12-style indentation and brace placement. Cleans up spacing, normalises indentation, and structures your PHP for readability.
What is PSR-12?
PSR-12 is the PHP coding style standard maintained by the PHP-FIG (Framework Interop Group). It extends and replaces PSR-2, defining rules for indentation (4 spaces), brace placement, line length, namespace declarations, and more. Major PHP frameworks like Laravel and Symfony follow PSR-12, making it the de-facto standard for modern PHP development.
Frequently Asked Questions
?> tag in PHP-only files. This prevents accidental whitespace or newlines after the tag from being sent as output before headers, which can cause "headers already sent" errors. Always omit it in class files, configuration files, and includes.Want these as desktop apps?
Prefer software that runs offline on your PC? My Windows apps start at a $49 lifetime license. Pay once, no subscription, and there is a free version to try first.
See desktop apps →Need something built, not just formatted?
This toolbox is free. If your business needs custom software, AI integration, or a system built around this kind of tooling, that's what I do for a living.