diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,9 +4,18 @@
 The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
 and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
 
+## 0.9.7
+### Added
+- JSON encoding/decoding for blocks.
+
+### Fixed
+- Fix lowercase HRP test for Bech32.
+
 ## 0.9.6
 ### Added
 - `bloomRelevantUpdate` implementation for Bloom filters (thanks to @IlyasRidhuan).
+
+### Fixed
 - Fix for Bech32 encoding (thanks to @pavel-main).
 
 ## 0.9.5
diff --git a/haskoin-core.cabal b/haskoin-core.cabal
--- a/haskoin-core.cabal
+++ b/haskoin-core.cabal
@@ -4,10 +4,10 @@
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: 263bc514478d37e2471bbc351ea84b803c76e518c55d7143d1e7927cd5f49e68
+-- hash: 5c1c1a7a9f8aa636d437253dc44d419ea3af2f88a0b1fb4973b6390fda840216
 
 name:           haskoin-core
-version:        0.9.6
+version:        0.9.7
 synopsis:       Bitcoin & Bitcoin Cash library for Haskell
 description:    Haskoin Core is a complete Bitcoin and Bitcoin Cash library of functions and data types for Haskell developers.
 category:       Bitcoin, Finance, Network
@@ -81,7 +81,8 @@
   hs-source-dirs:
       src
   build-depends:
-      QuickCheck
+      HUnit
+    , QuickCheck
     , aeson
     , array
     , base >=4.9 && <5
@@ -93,10 +94,12 @@
     , cryptonite
     , entropy
     , hashable
+    , hspec
     , memory
     , mtl
     , murmur3
     , network
+    , safe
     , scientific
     , secp256k1-haskell
     , split
diff --git a/src/Network/Haskoin/Block/Common.hs b/src/Network/Haskoin/Block/Common.hs
--- a/src/Network/Haskoin/Block/Common.hs
+++ b/src/Network/Haskoin/Block/Common.hs
@@ -76,6 +76,34 @@
         putVarInt $ length txs
         forM_ txs put
 
+instance ToJSON Block where
+    toJSON = String . encodeHex . encode
+
+instance FromJSON Block where
+    parseJSON =
+        withText "Block" $ \t -> do
+            bin <-
+                case decodeHex t of
+                    Nothing -> mzero
+                    Just bin -> return bin
+            case decode bin of
+                Left e -> fail e
+                Right h -> return h
+
+instance ToJSON BlockHeader where
+    toJSON = String . encodeHex . encode
+
+instance FromJSON BlockHeader where
+    parseJSON =
+        withText "BlockHeader" $ \t -> do
+            bin <-
+                case decodeHex t of
+                    Nothing -> mzero
+                    Just bin -> return bin
+            case decode bin of
+                Left e -> fail e
+                Right h -> return h
+
 -- | Block header hash. To be serialized reversed for display purposes.
 newtype BlockHash = BlockHash
     { getBlockHash :: Hash256 }
diff --git a/test/Network/Haskoin/Address/Bech32Spec.hs b/test/Network/Haskoin/Address/Bech32Spec.hs
--- a/test/Network/Haskoin/Address/Bech32Spec.hs
+++ b/test/Network/Haskoin/Address/Bech32Spec.hs
@@ -47,8 +47,7 @@
         it "empty HRP encode" $
             assert $ isNothing $ bech32Decode "10a06t8"
         it "hrp lowercased" $
-            Just "hrp1g9xj8m" `shouldBe`
-            bech32Encode "HRP" []
+            bech32Encode "HRP" [] `shouldBe` bech32Encode "hrp" []
 
 
 testValidChecksum :: Bech32 -> Assertion
diff --git a/test/Network/Haskoin/BlockSpec.hs b/test/Network/Haskoin/BlockSpec.hs
--- a/test/Network/Haskoin/BlockSpec.hs
+++ b/test/Network/Haskoin/BlockSpec.hs
@@ -85,8 +85,12 @@
     describe "block serialization" $ do
         it "encodes and decodes block" $
             property $ forAll (arbitraryBlock net) cerealID
+        it "encodes and decodes block JSON" $
+            property $ forAll (arbitraryBlock net) testID
         it "encodes and decodes block header" $
             property $ forAll arbitraryBlockHeader cerealID
+        it "encodes and decodes block header JSON" $
+            property $ forAll arbitraryBlockHeader testID
         it "encodes and decodes getblocks" $
             property $ forAll arbitraryGetBlocks cerealID
         it "encodes and decodes getheaders" $
diff --git a/test/Network/Haskoin/NetworkSpec.hs b/test/Network/Haskoin/NetworkSpec.hs
--- a/test/Network/Haskoin/NetworkSpec.hs
+++ b/test/Network/Haskoin/NetworkSpec.hs
@@ -1,20 +1,20 @@
 {-# LANGUAGE OverloadedStrings #-}
 module Network.Haskoin.NetworkSpec (spec) where
 
-import           Data.Maybe                (fromJust)
-import           Data.Serialize            as S
-import           Data.Text                 (Text)
-import           Data.Word                 (Word32)
+import           Data.Maybe                  (fromJust)
+import           Data.Serialize              as S
+import           Data.Text                   (Text)
+import           Data.Word                   (Word32)
 import           Network.Haskoin.Address
 import           Network.Haskoin.Constants
 import           Network.Haskoin.Keys
 import           Network.Haskoin.Network
 import           Network.Haskoin.Test
+import           Network.Haskoin.Transaction
 import           Network.Haskoin.Util
-import           Network.Haskoin.Transaction.Common
 import           Test.Hspec
-import           Test.HUnit                (Assertion, assertBool,
-                                            assertEqual)
+import           Test.HUnit                  (Assertion, assertBool,
+                                              assertEqual)
 import           Test.QuickCheck
 
 spec :: Spec
@@ -121,16 +121,16 @@
         relevantOutputHash = fromJust $ decodeHex"03f47604ea2736334151081e13265b4fe38e6fa8"
         bf1 = bloomInsert bf0 relevantOutputHash
         bf2 = fromJust $ bloomRelevantUpdate bf1 relevantTx
-        spendTxInput = (encode .prevOutput) <$> txIn spendRelevantTx 
+        spendTxInput = (encode .prevOutput) <$> txIn spendRelevantTx
 
 irrelevantOutputNotUpdated :: Assertion
-irrelevantOutputNotUpdated = assertEqual "Bloom filter not updated" Nothing bf2 
+irrelevantOutputNotUpdated = assertEqual "Bloom filter not updated" Nothing bf2
     where
         bf0 = bloomCreate 10 0.000001 0 BloomUpdateAll
         relevantOutputHash = fromJust $ decodeHex"03f47604ea2736334151081e13265b4fe38e6fa8"
         bf1 = bloomInsert bf0 relevantOutputHash
         bf2 = bloomRelevantUpdate bf1 unrelatedTx
-        spendTxInput = (encode .prevOutput) <$> txIn spendRelevantTx 
+        spendTxInput = (encode .prevOutput) <$> txIn spendRelevantTx
 
 -- Random transaction (57dc904f32ad4daab7b321dd469e8791ad09df784cdd273a73985150a4f225e9)
 relevantTx :: Tx
