Env to Php Array Converter

Env to Php converter just need to select the .env file on your computer, or paste the contents of the Env file into the editor then click convert to Php Array, then copy the result to use

Input ENV
Example
APP_NAME=Laravel APP_ENV=local APP_KEY= APP_DEBUG=true APP_URL=https://sita.app LOG_CHANNEL=stack LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel DB_USERNAME=root DB_PASSWORD=o4GQ7S0NyzEPX1TeFdOU57Z9iYnqlozp2XUWoMpv BROADCAST_DRIVER=log CACHE_DRIVER=file FILESYSTEM_DISK=local QUEUE_CONNECTION=sync SESSION_DRIVER=file SESSION_LIFETIME=120 MEMCACHED_HOST=127.0.0.1 REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 MAIL_MAILER=smtp MAIL_HOST=mail_host MAIL_PORT=1025 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null MAIL_FROM_ADDRESS="hello@example.com" MAIL_FROM_NAME="Sita.app" AWS_ACCESS_KEY_ID=o4GQ7S0NyzEPX1TeFdOU57Z9iYnqlozp2XUWoMpv AWS_SECRET_ACCESS_KEY=o4GQ7S0NyzEPX1TeFdOU57Z9iYnqlozp2XUWoMpv AWS_DEFAULT_REGION=us-east-1 AWS_BUCKET=o4GQ7S0NyzEPX1TeFdOU57Z9iYnqlozp2XUWoMpv AWS_USE_PATH_STYLE_ENDPOINT=false PUSHER_APP_ID=o4GQ7S0NyzEPX1TeFdOU57Z9iYnqlozp2XUWoMpv PUSHER_APP_KEY=o4GQ7S0NyzEPX1TeFdOU57Z9iYnqlozp2XUWoMpv PUSHER_APP_SECRET=o4GQ7S0NyzEPX1TeFdOU57Z9iYnqlozp2XUWoMpv PUSHER_APP_CLUSTER=mt1o4GQ7S0NyzEPX1TeFdOU57Z9iYnqlozp2XUWoMpv MIX_PUSHER_APP_KEY="DEMO_BazCiqsPQXgoPuXXlwm1Kl12P7FdBykUaCgEv8ff_DEMO" MIX_PUSHER_APP_CLUSTER="DEMO"

PHP Output:

How to convert Env to Php Array?

Step 1: Select the .env file on your computer or paste the content into a comfortable editor
Step 2: Click Convert Env to Php Array button
Step 3: Copy the results or download the .env file to your computer to use

Env is a file used to store the configuration of a software application or website, the content consists of many lines, in which each line has a Key=Value structure.

Reading Env files from programming languages ​​is quite easy, because it is supported by many popular libraries.

However, sometimes when I code in PHP, I often hesitate to write functions that read this file, instead I build an Env to Array converter in Php for easy use when needed.

This tool does not need to install any other software or libraries, just a browser is enough.

It is handled entirely on my server, so it doesn't depend too much on your browser version or operating system.