1. I consider him as a hero.

2. I consider him a hero.
3. I consider him to be a hero.
4. I consider that he is a hero.
=======================
Which one is grammatical?

2 and 3 are best, and 4 is okay. 1 is awkward.

All four sentences are grammatically correct. However, it is more common to use sentences 2 and 3:

2. I consider him a hero.
3. I consider him to be a hero.

Both sentences express the same meaning, but sentence 2 is more concise.

All four sentences are grammatically correct. However, there are slight differences in meaning and style among them.

1. "I consider him as a hero" is grammatically correct, but it is less common and can sound slightly awkward or less natural to native English speakers. It is more common to use the verb "consider" with a direct object and a complement, as shown in the other three sentences.

2. "I consider him a hero" is a simple and common construction. The verb "consider" acts as a linking verb, and "him" is the direct object, while "a hero" is the complement that describes or renames the direct object. This sentence indicates that the speaker views or regards him as a hero.

3. "I consider him to be a hero" is similar to the second sentence, but here the infinitive phrase "to be a hero" is used as an additional complement to further clarify the speaker's opinion. This construction is more explicit and emphasizes the speaker's belief or judgment about him being a hero.

4. "I consider that he is a hero" is generally used when it is necessary or desired to include the conjunction "that" to introduce a subordinated clause expressing what is being considered. This construction is less common in everyday conversation but is still grammatically correct. It highlights the clause "he is a hero" as the subject or object of the clause, depending on the context.

In conclusion, the second and third sentences are the most common and natural-sounding ways to express the idea that you regard or view him as a hero.