Crossbar resistive switching devices down to 40 × 40 nm 2 in size comprising 3-nm-thick HfO 2 layers are forming-free and exhibit up to 10 5 switching cycles. Four-nanometer-thick devices display the ability of gradual switching in both directions, thus emulating long-term potentiation/depression properties akin to biological synapses. Both forming-free and gradual switching properties are modeled in terms of oxygen vacancy generation in an ultrathin HfO 2 layer. By applying the voltage pulses to the opposite electrodes of nanodevices with the shape emulating spikes in biological neurons, spike-timing-dependent plasticity functionality is demonstrated. Thus, the fabricated memristors in crossbar geometry are promising candidates for hardware implementation of hybrid CMOS-neuron/memristor-synapse neural networks.