A pet crate having a top, a bottom, and a cage between the top and bottom. The cage can be engaged to and disengaged from each of the top and bottom. When engaged to the top and bottom, or when disengaged from either one or both of the top and bottom, the cage is endless and can safely hold a pet therein. When disengaged from the top and bottom, the cage is foldable into a closed, endless and flat configuration such that the cage can be stored between the top and bottom such that the crate as a whole in such stored configuration is generally flat. When disengaged from the top and bottom, the cage is foldable out into a fence configuration by disconnecting two ends of the cage.