Horizontal transfer, gene loss, and gene duplication result in dynamic bacterial genomes subject to a complex mixture of different modes of evolution. Closely related strains can differ in the presence or absence of many genes, and the total number of distinct genes found in a set of related isolates -- the pan-genome -- is often many times larger than the genome of individual isolates. We have developed a pipeline for pan-genome analysis and a web-based visualization software for interactive exploration of the pan-genome. The visualization allows rapid filtering of and searching for genes. For each gene cluster, panX displays an alignment, a phylogenetic tree, maps mutations within that cluster to the branches of the tree, and infers loss and gain of genes on the core-genome phylogeny. PanX is available at http://pangenome.de. User generated pan-genomes can be visualized either using a custom web-server or by serving panX locally as stand-alone browser-based application.