Align Text Into Columns
Line up assignments, key-value pairs or comments by padding before a separator such as =, :, => or #, keeping comments and lines without it unchanged.
Free · No sign-up · Your inputs stay in your browser
Input
Align text into columns on a separator
Output
Aligned
134 characters
Lines without the separator, comments and blank lines are left exactly as they were. Aligned assignments read well but make diffs noisy, since adding one longer key re-indents every line: many style guides (and PHP-CS-Fixer's default) align only within a block for that reason. Note that a .env value with spaces before = is not parsed the same way by every loader.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
Readable blocks
Aligned key-value blocks in .env files, YAML, PHP arrays and Makefiles are easier to scan. The cost is in version control: adding one longer key re-pads every line in the block and the diff grows, which is why many style guides and formatters only align within small blocks, or not at all.
Check the file format
Some formats are sensitive to the padding. A .env value with spaces around the equals sign is not parsed the same way by every loader, so test before aligning one.