A bike rack includes a base and a bike rack. The base is connected to a vehicle and the bike rack is foldably connected to the base. The bike rack includes two sets of supports for supporting and securing the bike front wheel and the bike rear wheel. A locking unit is connected to each support and includes a hooking member. By pressing a pressing end of the hooking member, the bike rack is easily folded or expanded relative to the base.