powering the Arduino Uno with a 12V battery

So I can just wire a positive wire to the Vin on the arduino and a negative wire to the ground pin from a 12v battery? I was worried that the arduino would fry up or something.