How to get the result of MySQL explain query into a file?
Using the syntax of EXPLAIN, no.

You can run the explain from the command line however:

mysql -e 'EXPLAIN ... ' &gt; /tmp/myexplain.json


SQL isn't responsible for the pretty presentation of data, Workbench is one option.