BackgroundTogether with application of next-generation sequencing technologies and increased accumulation of genomic variation data in different organism species, an opportunity for effectively identification of superior alleles of functional genes to facilitate marker-assisted selection is emerging, and the clarification of haplotypes of functional genes is becoming an essential target in recent study works.ResultsIn this paper, we describe an R package ‘geneHapR’ developed for haplotypes identification, statistics and visualization analysis of candidate genes. This package could integrate genotype data, genomic annotating information and phenotypic variation data to clarify genotype variations, evolutionary-ship, and morphological effects among haplotypes through variants visualization, network construction and phenotypic comparison. ‘geneHapR’ also provides functions for Linkage Disequilibrium block analysis and visualizing of haplotypes geo-distribution.ConclusionsThe R package ‘geneHapR’ provided an easy-to-use tool for haplotype identification, statistic and visualization for candidate gene and will provide useful clues for gene functional dissection and molecular-assistant pyramiding of beneficial alleles of functional locus in future breeding programs.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12859-023-05318-9.