YAML input
Paste your YAML below, then press Convert.
PHP Array output
Waiting for YAML input.
Convert YAML to PHP Array free, in seconds. Paste your data below, press Convert, then copy the result and paste it into your PHP config or seeder. Everything runs in your browser, so nothing is ever uploaded.
Paste your YAML below, then press Convert.
Waiting for YAML input.
Paste YAML into the input box and press Convert (or just keep typing, conversion happens as you type). The tool parses it with the js-yaml library, then emits modern PHP short array syntax wrapped in a
The output uses modern short array syntax with 'key' => value pairs and is wrapped in <?php return [...]; so the file works the moment you save it as a .php file. Strings are single-quoted, numbers stay numeric, booleans become true or false, and missing values become null. Paste it straight into a Laravel config file, a Symfony parameter file or a database seeder.