Visualize Go slices and arrays
Expore the connection between slices and arrays by generating diagrams from Go code.
-
1Play with the code in the editor below.
-
2Pass arrays and slices to the Visualize function.The signature of this function looks like
Visualize(vals ...any)
. The values must be slices or pointers to arrays. -
3Click the visualize button to update the diagram.
editor
Options
output



Get my free newsletter periodically*
Used by 500+ developers to boost their Go skills.
*working on a big project as of 2025, will get back to posting on the regular schedule once time allows.

Willem Schots