The reason why your ear crackles when you put hydrogen peroxide in it is because the hydrogen peroxide reacts chemically with the earwax.
When you put hydrogen peroxide in your ear and it comes into contact with the earwax, the hydrogen peroxide releases oxygen, which causes the earwax in your ear to bubble and then soften.
This is a process which helps break down the earwax and makes it easier for the earwax to drain from your ear canal.
The ear crackling when you put hydrogen peroxide in it, is normal and nothing to worry about and means that the hydrogen peroxide is working as it should.
When using hydrogen peroxide to clean your ears and soften the earwax, you should leave the hydrogen peroxide in your ear and allow it to bubble and fizz.
Then after you are used to the feeling the solution should be left to bubble and fizz in your ear for up to 1 minute at a time.
Although when you first use the hydrogen peroxide you may only be able to tolerate the feeling of the bubbling and fizzing for a few seconds.
After the hydrogen peroxide is done fizzing and bubbling you can tip your head to the side and allow the hydrogen peroxide to come out over a sink or on a tissue.