Advertisement

TOML to PHP Array converter

Convert TOML to PHP Array free, right in your browser. Paste your TOML input below and press Convert. You get a PHP file with return [...]; that you can include directly. No sign-up, and nothing is ever uploaded.

TOML input

Paste your TOML below, then press Convert.

Runs 100% in your browser. Nothing is uploaded.

Waiting for input.

Advertisement

How the conversion works

Paste your TOML on the left and press Convert. The tool first parses the TOML (reading tables, arrays of tables, dotted keys and basic value types) into an internal table of rows and columns, then writes it out as PHP Array (emitting short [...] syntax wrapped in a return statement). If the input cannot be parsed you get a plain-English error instead of a broken file.

Where this comes in handy

People reach for this converter when moving app configuration or dataset files out of TOML and the data must be consumed by PHP code. Because everything runs locally in your browser, it is also handy for quick one-off migrations without installing database tools or writing throwaway scripts.

TOML to PHP Array FAQs

Can I paste a whole Cargo.toml or pyproject.toml file?
Yes. Paste the complete file and convert. Dependency lists, metadata tables and tool settings each become tidy rows you can open in a spreadsheet.
What TOML features does the parser support?
Tables, arrays of tables, dotted keys, strings, integers, floats, booleans, arrays and inline tables are supported. Dates are kept as plain text, which keeps round-trips predictable.
What PHP syntax is used?
Modern short array syntax [...] with 'key' => value pairs, wrapped in <?php return [...]; so you can include the file directly.
Are strings safely quoted?
Yes. Strings are single-quoted with backslashes and quotes escaped, safe for any UTF-8 content.
Is this converter free to use?
Yes. It is completely free with no sign-up, no watermarks and no usage caps.
Advertisement