Hitting them while backing up is pretty effective.
Just hold your left mouse button button down with your chrosshairs pointed at the mob.
When it turns red (indicating it took damage), immediately back up.
Repeat until the zombie is dead.
gaming.stackexchange.com/users/3107/Shaun
Another method is to use a lighter, and ignite the ground while running backwards.
It is less risky (provided you're outside setting fire to grass, not inside your wooden house!).
The monsters run into the fire and ignite.
gaming.stackexchange.com/users/5673/NibblyPig
Build a trap!
That way you don't even have to waste materials in producing swords, etc.
The simplest is to dig a pit 3-4 blocks deep and at least 2x2 wide, and plant some cacti in it.
Put the pit between you and the zombie and watch it fall inside and eventually die.
Better traps, such as most water traps, can actually kill the zombie and deliver the dropped goods outside to you.
There are many videos on youtube that demonstrate how to build one, (such as this one: )
gaming.stackexchange.com/users/3917/l I
Armour!
Armour really helps prevent damage.
A full undamaged set of armour will prevent all damage to your health for the next hit.
Also, a three high wall with a hole in in helps keep them away while you hit them.
gaming.stackexchange.com/users/4564/Theo Belaire
Mob pathfinding is really dumb, and you can use this to your advantage.
Partially hide yourself behind a corner, a tree, etc.
The zombie will get stopped by the blocks, and you can hit him repeatedly until he dies.
Also - unlike spiders, which jump, or skeletons, which shoot, zombies just walk forward.
If you time it right, you can strike them with your sword without getting hit at all.
gaming.stackexchange.com/users/6547/Luke
Build a one block wide passage so one zombies could go in at a time.
As a bonus, build a really good trap that doesn't involve lava, so the zombies could just walk right into it and end up committing suicide because they only have one target, you.
For example, drown them!
=)
gaming.stackexchange.com/users/39224/danilka1
Is there a smart way of disposing zombies and not losing like 2-3-4-5 hearts in the process? No matter how far you are, they always seem to reach further than you can which sucks... :S zombies should be short range not snipers..  Ok, so is there a specific tactic that works? A specific timing to hit them and not get hit? (except bow and arrow..)  thank you
How do I kill zombies in Minecraft and not get hurt?
gaming.stackexchange.com
<minecraft-java-edition>
gaming.stackexchange.com/questions/15339
gaming.stackexchange.com/users/6377/pootzko
Hitting them or igniting the ground while running backwards is effective. Armour prevents damage and build a one block passage so zombies go in one at a time. They main solution is to hit them while moving backwards. This is also a component in other solutions too, like using a lighter to light a fire on the ground, building a trap or making armour, which helps prevent damage. You could also build a passage where only one zombie fits at a time, which works due to the bad pathfinding.
Users suggest a variety of way with which to kill zombies effectively.