Planet formation theories predict the existence of free-floating planets that have been ejected from their parent systems. Although they emit little or no light, they can be detected during gravitational microlensing events. Microlensing events caused by rogue planets are characterized by very short timescales tE (typically below two days) and small angular Einstein radii θE (up to several μas). Here we present the discovery and characterization of two ultra-short microlensing events identified in data from the Optical Gravitational Lensing Experiment (OGLE) survey, which may have been caused by free-floating or wide-orbit planets. OGLE-2012-BLG-1323 is one of the shortest events discovered thus far (tE = 0.155 ± 0.005 d, θE = 2.37 ± 0.10μas) and was caused by an Earth-mass object in the Galactic disk or a Neptune-mass planet in the Galactic bulge. OGLE-2017-BLG-0560 (tE = 0.905 ± 0.005 d, θE = 38.7 ± 1.6μas) was caused by a Jupiter-mass planet in the Galactic disk or a brown dwarf in the bulge. We rule out stellar companions up to a distance of 6.0 and 3.9 au, respectively. We suggest that the lensing objects, whether located on very wide orbits or free-floating, may originate from the same physical mechanism. Although the sample of ultrashort microlensing events is small, these detections are consistent with low-mass wide-orbit or unbound planets being more common than stars in the Milky Way