The official Bitcoin client has "getchaintips" command that gives you the output like this:
[
{
"height" : 403263,
"hash" : "00000000000000000210fee63635c72da771c6b136a63f20ff9d058ce778618d",
"branchlen" : 0,
"status" : "active"
},
{
"height" : 402922,
"hash" : "00000000000000000692c289cc4a4e9726018d6a030ad10c84f70adc2e920597",
"branchlen" : 1,
"status" : "valid-fork"
},
{
"height" : 402751,
"hash" : "00000000000000000180755378324c16847b2f49af428c763b8ff411d51d7767",
"branchlen" : 1,
"status" : "valid-headers"
},
{
"height" : 402723,
"hash" : "000000000000000000263e1722b119e2547a4167b2f9d5bfc89f0d9dc28e0e18",
"branchlen" : 1,
"status" : "valid-headers"
},
{
"height" : 399879,
"hash" : "0000000000000000005642fd14f92213a8ff68aa5071588f84dd2f1c61e93d0e",
"branchlen" : 1,
"status" : "valid-fork"
},
{
"height" : 399706,
"hash" : "000000000000000006aef254935a76c8b321519dcd86d4f5f5092f51ef374251",
"branchlen" : 1,
"status" : "valid-fork"
},
{
"height" : 399332,
"hash" : "000000000000000006972f107e48524ce3e01752c24a282beafc7b046f29f221",
"branchlen" : 1,
"status" : "valid-headers"
},
{
"height" : 399247,
"hash" : "00000000000000000228b92c2c2c8a91673c45f6aa10fb9acabfb587f73ccc81",
"branchlen" : 1,
"status" : "valid-fork"
},
{
"height" : 399138,
"hash" : "00000000000000000382da0f1d9cb0bffc6edbbdd53ba8f87877ffe11263100d",
"branchlen" : 1,
"status" : "valid-headers"
},
{
"height" : 399098,
"hash" : "000000000000000001bb9eac7a0684d2d0481b9a7fe74568ada10ada5734c857",
"branchlen" : 1,
"status" : "valid-fork"
},
{
"height" : 398487,
"hash" : "0000000000000000008fb4567640f05fddc79d28fcb0601a187b8e5cb46cb84c",
"branchlen" : 1,
"status" : "valid-headers"
},
{
"height" : 398217,
"hash" : "0000000000000000078f1ed2154a4db3d7cfa5615c584585c07e3f53ddba6aa8",
"branchlen" : 1,
"status" : "valid-fork"
},
{
"height" : 398205,
"hash" : "0000000000000000067886752a9524c8043341b5adc4100fbe11e7e45af1020d",
"branchlen" : 1,
"status" : "valid-headers"
},
{
"height" : 397486,
"hash" : "00000000000000000158e2c73ded7c24f0087514d646ae59ff017347bfff4c15",
"branchlen" : 1,
"status" : "valid-fork"
},
{
"height" : 395487,
"hash" : "000000000000000002782e988a2da3aa252752f3accae8624242527ca99de06e",
"branchlen" : 1,
"status" : "headers-only"
}
]