I'd =I would
I'd = I had

It's= It is

It's=It has

These are very confusing. How one can know that in any given sentence (it's= it is or it has) e.g

It's a pen.= It is a pen.

It's a pen= It has a pen.

Please clear my doubt.

"it has" cannot contract to "it's" unless "has" co-occurs with a past participle (PP).

"It's a pen" - no PP - It is a pen. - Can't be "It has a pen" - impossible.
"It's been done that way for years" - PP (been) - "It has been done that way for years." - Can't be "It is been ..."
"He's tearing your shirt" - no PP - He is tearing ...
"He's torn your shirt" - PP (torn) - He has torn ...

'd meaning "would" occurs with a bare infinitive.
'd meaning "had" occurs with a PP.

I'd go if the weather were warmer. 'd + bare infinitive (go), so "I would go".
I'd already gone before you arrived. 'd + PP (gone), so "I had already gone before ..."

Hope that helps.
Emotion: smile
1 2 3
"I'd" means either "I had " or " I would " in my dictionary (LONGMAN), and so does "It's " which means either "It has " or "It is". The following are examples":
the short form of 'I had'
I wish I'd said that.
the short form of 'I would'
I'd leave now if I were you.
the short form of 'it is'
It's raining.
a short form of 'it has'
It's been cloudy all day.
Note: when we say "It's " instead of "It has", it usually used with "been" together, which stands for "It has been"
Site Hint: Check out our list of pronunciation videos.
 CalifJim's reply was promoted to an answer.
A little thread bump...is it even correct English to say "it's been"? Or is that just a simple result of laziness on behalf of the speaker?
It is perfectly accceptable to shorten It has been to It's been in speech.

It's been ages since I saw you! I can't imagine a context where anyone would say a formal It has been ages since I saw you.

It's been a while, yes. The usual reply. If they wanted to really emphasise their agreement, they might say 'It HAS been a while, yes'.
Teachers: We supply a list of EFL job vacancies
I don't think you can sensibly say "laziness on behalf of the speaker", can you?
on the part of, perhaps.
Unfortunately "I'd" can in fact have the meaning "I had".

For example, "I'd just finished my homework when the doorbell rang." = "I had just finished my homework when the doorbell rang.", which uses "I'd" as the contraction for "I had". (past perfect)

You are correct in that "I'd" does mean "I would", as well. "I'd rather be a hammer than a nail!".

With regards to "It's", again this contraction can also have two meanings.

For example: "It's a beautiful day."= "It is a beautiful day.".

"It's been a long time since we've heard from him." = "It has been a long time since we have heard from him." (past perfect)

In short, It's = It is or It has

I'd = I would or I had It all depends on the context of what you are trying to say.

PS. "It's got" is NOT the contraction for "It has".....rather is it the contraction for "It has got".
Students: We have free audio pronunciation exercises.
I found that interesting use of a contraction in Stevie Wonder's "Lately" lyrics:

Lately, I have had the strangest feeling
With no vivid reason here to find
Yet the thought of losing you's been hanging
'round my mind

Way cool!
Show more