We present JBrowse 2, a general-purpose genome annotation browser offering enhanced visualization of complex structural variation and evolutionary relationships. JBrowse 2 retains the core features of the open-source JavaScript genome browser JBrowse while adding new views for synteny, dotplots, breakpoints, gene fusions, and whole-genome overviews. The software readily allows users to share sessions, open multiple genomes or views, and navigate quickly between these views. It can be embedded in a web page, used as a standalone desktop application, or run from Jupyter notebooks or R sessions. Using a plugin framework, developers can create new data adapters, track types, and visualizations. These improvements are enabled by a ground-up redesign of the JBrowse architecture using modern web technology. We describe application functionality, use cases, performance benchmarks, and implementation notes for web administrators and developers.