Text & Docs
PHP Editor
Edit PHP files locally with syntax highlighting, folding, find and replace, one-click formatting, keyboard shortcuts, and file import and download. No code uploads or execution.
About this tool
Create or import a PHP file in your browser, edit with syntax highlighting, line numbers, folding, and find and replace, then download the result.
Format pure PHP with one click or Shift + Alt + F (Shift + Option + F on macOS). Editing and formatting happen locally; code is never uploaded or executed.
Best use cases
- Make quick changes to PHP files, configuration snippets, or documentation examples without opening an IDE.
- Clean up indentation, spacing, and line breaks in pure PHP, with a single undo to restore the original.
- Edit and export mixed PHP and HTML files; one-click formatting is limited to pure PHP.
How to use it
- Create a file, paste code, or import a local .php file.
- Edit, search, fold, and format as needed. Failed formatting leaves the original code intact.
- Rename, copy, or download the UTF-8 .php file. Allow preference storage to restore drafts in this browser.
FAQ
Is my PHP code uploaded or executed?
No. Editing and formatting happen in your browser without backend execution or formatting requests.
Which files can be formatted?
Pure PHP files with PHP tags, using four-space indentation and a target line width of 100. Mixed PHP and HTML files can be edited but are not formatted.
How do I undo formatting?
Press Ctrl + Z in the editor, or Command + Z on macOS. Formatting is recorded as a single undoable edit.