Open PHP files online
Drop a PHP file to preview it instantly in your browser. Free and private: your file is never uploaded, and no account is needed.
What is a PHP file?
A .php file contains PHP code, often mixed with HTML. PHP runs on a web server and powers a large share of websites, including WordPress.
Because PHP files execute on servers, an uploaded or downloaded script can be a security risk if you do not know what it does.
| Full name | PHP Script |
|---|---|
| File extension | .php |
| MIME type | application/x-httpd-php |
| Developed by | Rasmus Lerdorf; maintained by The PHP Group |
| Introduced | 1995 |
How to open a PHP file online
- Drop the file. Drag your .php file onto the panel at the top of this page, or click it to pick the file from your device.
- See it instantly. Your browser reads the file locally and shows the preview in a second or two.
- View full screen or download. Use the full screen button for a distraction-free view, or download a copy. Close the page when you are finished and nothing is kept.
How Drop and Open displays PHP files
Drop and Open reads the file locally as UTF-8 text and shows it in a monospace block with line breaks preserved. The content is inserted as plain text, so nothing inside the file can run. No syntax highlighting is applied.
What PHP files are used for
- WordPress themes and plugins
- Web application back ends
- Contact form handlers
- Legacy sites
Tips for working with PHP files
- Search unknown scripts for eval, base64_decode and system.
- Never upload an unknown PHP file to a web server.
- Check for hard-coded passwords before sharing.
Is it private to open a PHP file here?
Yes. Drop and Open runs entirely in your browser. When you choose a file, the browser reads it into local memory and displays it. There is no upload, no account, and no server-side copy. You can check this by opening your browser's developer tools, watching the Network tab and dropping a file. Learn more in our guide to client-side and server-side viewers.