How to change the container/format of the video without re-encoding the video?

I have a video in MKV format encoded using H.264 codec. Can i convert it to WebM format without re-encoding it?

You can change the container/format of your video file without encoding if and only if your target container/format supports the video and audio codec of your existing video. Otherwise, you will have to re-encode the video with a new video/audio codec supported by your new container/format. In your case, WebM format does not support H.264 video codec so you have to re-encode your video to either VP8 or VP9 codec which is supported by WebM format.

Where can I find the compatibility of different codecs and containers/formats?

You can find the compatibility matrix for codec and formats below: