On the datasheet it doesn't mention an input voltage. Must the input voltage be higher than the output voltage or does it increase to 12 V if I input 8 V for example?
If so, what is the current like that it outputs?
On the datasheet it doesn't mention an input voltage. Must the input voltage be higher than the output voltage or does it increase to 12 V if I input 8 V for example?
If so, what is the current like that it outputs?
A 7812 is a linear regulator, and does not step up the input voltage if the input is below the output (for that you need a DC-DC boost regulator). The input voltage must be above the output. All linear regulators have a minimum dropout voltage, or difference.
The 7812 is not a LDO (low-dropout regulator), as the typical dropout voltage is around 2 volts. (An LDO might have a dropout voltage of 0.7 volts).
On page 6 of the datasheet, the maximum dropout voltage Vd is listed as 2.5 volts, meaning you need a minimum of 14.5 volts input to the device to guarantee an output of 12 volts..
Voltage regulators basically can be divided in two big groups: linear regulators and SMPSs, short for Switch-Mode Power Supplies, aka "switchers". Switchers are the most versatile, they allow you to go from a lower voltage to a higher one or vice versa, and they often do so with high efficiency, often > 90%. That means that when your load consumes 10W the switcher will only dissipate 1W.
Linear regulators are different. They are like a variable series resistor between input and output, causing a voltage drop across the regulator.
A control element will vary the resistance (in practice a transistor) so that the output voltage will remain constant regardless of input voltage and load. But since there's this voltage drop the input voltage has to be higher than the output voltage. How much higher depends on the type of regulator. There are LDOs (Low Drop-Out) which still can regulate the output if the input is only a few hundreds of mV higher and there are even ultra low drop-out types which only need a few tens of mV.
The 7812 is a non-LDO linear regulator, which means it needs a higher input voltage. The datasheet does say how much it needs, but you may have to look for it. This is a snapshot of page 8:
All parameters are specified under certain conditions, and for the output voltage we can see that the condition is that the input voltage is minimum 14.5V. The 2.5V dropout is typical for a three-legged linear regulator. If we look further we can see two values for line regulation; it appears that this is best if the input voltage is at least 16V.
So you won't find a parameter "minimum input voltage", but it is mentioned as a condition for proper operation within certain limits.
A note on dissipation:
From the above it may look like you best make your input voltage a lot higher than the 12V output, but that's not true. The current to your load flows through the regulator and is the same current as will be drawn from the input voltage. So if you have a 12W load it will draw 1A from the regulator. If you have an input voltage of 20V the same 1A will be drawn from that 20V. So the 20V delivers 20W, while the load only consumes 12W. The difference of 8W will be dissipated in the regulator. That's a lot. Therefore it's best to keep the input voltage just above the minimum to prevent the regulator to become overheated.