Tool

PHP Formatter

Reindent PHP snippets in your browser. Strings, comments, and heredocs are left alone. PHP is not executed.

Limitations. This is a layout helper, not PHP-CS-Fixer and not a parser. It can mis-indent alternative syntax that spans lines, and it does not rewrite spacing inside a line. Review the result before you save it.

How to use it

Paste PHP, choose Example if you want a sample, then Format. Clear removes the text from this page. Nothing is uploaded.

Get new briefs by email

Short alerts when a PHP or WordPress vulnerability needs action.

Double opt-in via Buttondown; unsubscribe any time. See our privacy policy.