Skip to content

PHP Developer Suite · free · no sign-up

PHP Minifier

Remove comments and extra whitespace from PHP code.

How it works Report a problem

PHP Minifier

Compress PHP code for deployment by stripping non-functional characters

PHP Tool
Source PHP
Minified Output

                

About the PHP Minifier

Remove comments and extra whitespace from PHP code.

How to use the PHP Minifier

  1. Paste your code into the input box, or click Load Sample to load an example.
  2. Press Minify PHP.
  3. Use Copy (or Download where shown) to keep the result. Clear empties the box.

Tips

  • Keep the original source. Minified PHP is hard to maintain and gives only a small speed gain.

Frequently asked questions

Does minifying PHP make it faster?
The gain is tiny. Use OPcache for real performance improvements.