Changing ADC parameters

I need to read an analog value, minimum value will be from 0 - 2V and maximum will be 10-30V. How to make it work with analog in pin.

Hence I want to get the output from 0-1024 which corresponds 0-30V. How to acheive this in arduino?

You use two resistors in a potential divider such that the maximum input presented to the arduino does not exceed 5V.

Can you please elobrate....Some image or something. Can I change the ref ?

Changing the referance voltage will not help you. The maximum voltage you can apply to the chip is 5V.
A potential divider is one resistor connected from your voltage to the analogue input and another resistor from the same analogue input to ground.
Google the term potential divider if you want more.

Got it then how it gonna help me. My max voltage ref is not more than 5 then why I should use it?

Just curious.

After exploring the google I came to know what you mean, You simply wants to say is whatever voltage I want to read divide using voltage divider in such a way that at the max 5V reaches to arduino pin.
Anything I can do for protection.

Anything I can do for protection.

Is there a chance your input could go higher than 30V? If so you could lose some accuracy as a trade-off for safety by making your potential divider range 0-35V (say) to give a buffer.

There's also transient suppressors or a 5V Zener diode for additional safety.

What do you think the worst case will be?

There's also transient suppressors or a 5V Zener diode for additional safety.

The problem with that on analogue inputs is that it starts to conduct before 5V and so upsets the accuracy at the top end.
Better to use clamping diodes.

Thanks Mike - I'll be giving that a read later for sure. I have a project where a circuit has a Zener in it and it fluctuates all over the place - I might revisit it with this now and see if that sorts it.

Cheers ! Geoff