Searches are performed for both promptlike and long-lived dark photons, A ', produced in proton-proton collisions at a center-of-mass energy of 13 TeV. These searches look for A '->mu(+)mu(-) decays using a data sample corresponding to an integrated luminosity of 5.5 fb(-1) collected with the LHCb detector. Neither search finds evidence for a signal, and 90% confidence-level exclusion limits are placed on the gamma-A ' kinetic mixing strength. The promptlike A ' search explores the mass region from near the dimuon threshold up to 70 GeV and places the most stringent constraints to date on dark photons with 214 < m(A ') less than or similar to 740 MeV and 10.6 < m(A ') less than or similar to 30 GeV. The search for long-lived A '->mu(+)mu(-) decays places world-leading constraints on low-mass dark photons with lifetimes O(1)ps.