diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go
index 8b01457e66224ef6b0262e7fbcea80926dfeeeab..4cb2d997903e7727149a2f26dcbe6b9897b9cab7 100644
--- a/cmd/ethereum/main.go
+++ b/cmd/ethereum/main.go
@@ -197,7 +197,7 @@ func startEth(ctx *cli.Context, eth *eth.Ethereum) {
 		}
 		am := eth.AccountManager()
 		// Attempt to unlock the account
-		err := am.Unlock(ethutil.Hex2Bytes(split[0]), split[1])
+		err := am.Unlock(ethutil.FromHex(split[0]), split[1])
 		if err != nil {
 			utils.Fatalf("Unlock account failed '%v'", err)
 		}
diff --git a/ethutil/common.go b/ethutil/common.go
index 3ade7fd165ce38d51a6d318ba8cdccc4288da9f3..29854c882b60b94b879ac18463c6a295588d9761 100644
--- a/ethutil/common.go
+++ b/ethutil/common.go
@@ -64,6 +64,19 @@ func DefaultDataDir() string {
 		return path.Join(usr.HomeDir, ".ethereum")
 	}
 }
+
+func FromHex(s string) []byte {
+	if len(s) > 1 {
+		if s[0:2] == "0x" {
+			s = s[2:]
+		}
+		if len(s)%2 == 1 {
+			s = "0" + s
+		}
+		return Hex2Bytes(s)
+	}
+	return nil
+}
 func IsWindows() bool {
 	return runtime.GOOS == "windows"
 }
diff --git a/ethutil/common_test.go b/ethutil/common_test.go
index c2b6077e9bcdeb508cb1358e797e611cb9644044..20064b1e7bba1055732a1661d958887b411e25d3 100644
--- a/ethutil/common_test.go
+++ b/ethutil/common_test.go
@@ -1,8 +1,10 @@
 package ethutil
 
 import (
+	"bytes"
 	"math/big"
 	"os"
+	"testing"
 
 	checker "gopkg.in/check.v1"
 )
@@ -66,3 +68,22 @@ func (s *CommonSuite) TestLarge(c *checker.C) {
 	c.Assert(adalarge, checker.Equals, "10000E7 Einstein")
 	c.Assert(weilarge, checker.Equals, "100 Babbage")
 }
+
+//fromHex
+func TestFromHex(t *testing.T) {
+	input := "0x01"
+	expected := []byte{1}
+	result := FromHex(input)
+	if bytes.Compare(expected, result) != 0 {
+		t.Errorf("Expected % x got % x", expected, result)
+	}
+}
+
+func TestFromHexOddLength(t *testing.T) {
+	input := "0x1"
+	expected := []byte{1}
+	result := FromHex(input)
+	if bytes.Compare(expected, result) != 0 {
+		t.Errorf("Expected % x got % x", expected, result)
+	}
+}
diff --git a/rpc/api.go b/rpc/api.go
index af9f105309cf50b1236c74d8af450a0d25fddb1a..78e6a81367fa1a941003858287b8552fcc25b801 100644
--- a/rpc/api.go
+++ b/rpc/api.go
@@ -241,7 +241,7 @@ func (p *EthereumApi) Transact(args *NewTxArgs, reply *interface{}) (err error)
 	//	p.register[args.From] = append(p.register[args.From], args)
 	//} else {
 	/*
-		account := accounts.Get(fromHex(args.From))
+		account := accounts.Get(ethutil.FromHex(args.From))
 		if account != nil {
 			if account.Unlocked() {
 				if !unlockAccount(account) {
@@ -249,7 +249,7 @@ func (p *EthereumApi) Transact(args *NewTxArgs, reply *interface{}) (err error)
 				}
 			}
 
-			result, _ := account.Transact(fromHex(args.To), fromHex(args.Value), fromHex(args.Gas), fromHex(args.GasPrice), fromHex(args.Data))
+			result, _ := account.Transact(ethutil.FromHex(args.To), ethutil.FromHex(args.Value), ethutil.FromHex(args.Gas), ethutil.FromHex(args.GasPrice), ethutil.FromHex(args.Data))
 			if len(result) > 0 {
 				*reply = toHex(result)
 			}
@@ -480,7 +480,7 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error
 		if err := json.Unmarshal(req.Params, &args); err != nil {
 			return err
 		}
-		*reply = toHex(crypto.Sha3(fromHex(args.Data)))
+		*reply = toHex(crypto.Sha3(ethutil.FromHex(args.Data)))
 	case "web3_clientVersion":
 		*reply = p.xeth().Backend().Version()
 	case "net_version":
@@ -815,12 +815,12 @@ func toFilterOptions(options *FilterOptions) core.FilterOptions {
 
 	// Convert optional address slice/string to byte slice
 	if str, ok := options.Address.(string); ok {
-		opts.Address = [][]byte{fromHex(str)}
+		opts.Address = [][]byte{ethutil.FromHex(str)}
 	} else if slice, ok := options.Address.([]interface{}); ok {
 		bslice := make([][]byte, len(slice))
 		for i, addr := range slice {
 			if saddr, ok := addr.(string); ok {
-				bslice[i] = fromHex(saddr)
+				bslice[i] = ethutil.FromHex(saddr)
 			}
 		}
 		opts.Address = bslice
@@ -834,11 +834,11 @@ func toFilterOptions(options *FilterOptions) core.FilterOptions {
 		if slice, ok := topicDat.([]interface{}); ok {
 			topics[i] = make([][]byte, len(slice))
 			for j, topic := range slice {
-				topics[i][j] = fromHex(topic.(string))
+				topics[i][j] = ethutil.FromHex(topic.(string))
 			}
 		} else if str, ok := topicDat.(string); ok {
 			topics[i] = make([][]byte, 1)
-			topics[i][0] = fromHex(str)
+			topics[i][0] = ethutil.FromHex(str)
 		}
 	}
 	opts.Topics = topics
diff --git a/rpc/util.go b/rpc/util.go
index 573190e597a7debb86b5802bb5ed46bc89ec575a..4acd902849922f434050ea0af4a1bf064ef1da2b 100644
--- a/rpc/util.go
+++ b/rpc/util.go
@@ -128,19 +128,6 @@ func toHex(b []byte) string {
 	return "0x" + hex
 }
 
-func fromHex(s string) []byte {
-	if len(s) > 1 {
-		if s[0:2] == "0x" {
-			s = s[2:]
-		}
-		if len(s)%2 == 1 {
-			s = "0" + s
-		}
-		return ethutil.Hex2Bytes(s)
-	}
-	return nil
-}
-
 func i2hex(n int) string {
 	return toHex(big.NewInt(int64(n)).Bytes())
 }
diff --git a/rpc/util_test.go b/rpc/util_test.go
deleted file mode 100644
index b0a4979b5abcfa1468c889fad047b9977122279a..0000000000000000000000000000000000000000
--- a/rpc/util_test.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package rpc
-
-import (
-	"bytes"
-	"testing"
-)
-
-//fromHex
-func TestFromHex(t *testing.T) {
-	input := "0x01"
-	expected := []byte{1}
-	result := fromHex(input)
-	if bytes.Compare(expected, result) != 0 {
-		t.Errorf("Expected % x got % x", expected, result)
-	}
-}
-
-func TestFromHexOddLength(t *testing.T) {
-	input := "0x1"
-	expected := []byte{1}
-	result := fromHex(input)
-	if bytes.Compare(expected, result) != 0 {
-		t.Errorf("Expected % x got % x", expected, result)
-	}
-}
diff --git a/ui/qt/qwhisper/whisper.go b/ui/qt/qwhisper/whisper.go
index 2bc455b0bbdcffdf6cf72e4c0189435b1bbe051c..7fef1929f871ad8e836e83e2dcba10d6f1996f89 100644
--- a/ui/qt/qwhisper/whisper.go
+++ b/ui/qt/qwhisper/whisper.go
@@ -13,12 +13,6 @@ import (
 
 var qlogger = logger.NewLogger("QSHH")
 
-func fromHex(s string) []byte {
-	if len(s) > 1 {
-		return ethutil.Hex2Bytes(s[2:])
-	}
-	return nil
-}
 func toHex(b []byte) string { return "0x" + ethutil.Bytes2Hex(b) }
 
 type Whisper struct {
@@ -39,15 +33,15 @@ func (self *Whisper) SetView(view qml.Object) {
 func (self *Whisper) Post(payload []string, to, from string, topics []string, priority, ttl uint32) {
 	var data []byte
 	for _, d := range payload {
-		data = append(data, fromHex(d)...)
+		data = append(data, ethutil.FromHex(d)...)
 	}
 
-	pk := crypto.ToECDSAPub(fromHex(from))
+	pk := crypto.ToECDSAPub(ethutil.FromHex(from))
 	if key := self.Whisper.GetIdentity(pk); key != nil {
 		msg := whisper.NewMessage(data)
 		envelope, err := msg.Seal(time.Duration(priority*100000), whisper.Opts{
 			Ttl:    time.Duration(ttl) * time.Second,
-			To:     crypto.ToECDSAPub(fromHex(to)),
+			To:     crypto.ToECDSAPub(ethutil.FromHex(to)),
 			From:   key,
 			Topics: whisper.TopicsFromString(topics...),
 		})
@@ -76,7 +70,7 @@ func (self *Whisper) NewIdentity() string {
 }
 
 func (self *Whisper) HasIdentity(key string) bool {
-	return self.Whisper.HasIdentity(crypto.ToECDSAPub(fromHex(key)))
+	return self.Whisper.HasIdentity(crypto.ToECDSAPub(ethutil.FromHex(key)))
 }
 
 func (self *Whisper) Watch(opts map[string]interface{}, view *qml.Common) int {
@@ -106,10 +100,10 @@ func (self *Whisper) Messages(id int) (messages *ethutil.List) {
 
 func filterFromMap(opts map[string]interface{}) (f whisper.Filter) {
 	if to, ok := opts["to"].(string); ok {
-		f.To = crypto.ToECDSAPub(fromHex(to))
+		f.To = crypto.ToECDSAPub(ethutil.FromHex(to))
 	}
 	if from, ok := opts["from"].(string); ok {
-		f.From = crypto.ToECDSAPub(fromHex(from))
+		f.From = crypto.ToECDSAPub(ethutil.FromHex(from))
 	}
 	if topicList, ok := opts["topics"].(*qml.List); ok {
 		var topics []string
diff --git a/xeth/state.go b/xeth/state.go
index 0f6a042b30990cddd70ddc1259a74c878ca83566..bb729db33432cf08f27a9909c7595b261c65288c 100644
--- a/xeth/state.go
+++ b/xeth/state.go
@@ -1,6 +1,9 @@
 package xeth
 
-import "github.com/ethereum/go-ethereum/state"
+import (
+	"github.com/ethereum/go-ethereum/ethutil"
+	"github.com/ethereum/go-ethereum/state"
+)
 
 type State struct {
 	xeth  *XEth
@@ -16,7 +19,7 @@ func (self *State) State() *state.StateDB {
 }
 
 func (self *State) Get(addr string) *Object {
-	return &Object{self.state.GetStateObject(fromHex(addr))}
+	return &Object{self.state.GetStateObject(ethutil.FromHex(addr))}
 }
 
 func (self *State) SafeGet(addr string) *Object {
@@ -24,9 +27,9 @@ func (self *State) SafeGet(addr string) *Object {
 }
 
 func (self *State) safeGet(addr string) *state.StateObject {
-	object := self.state.GetStateObject(fromHex(addr))
+	object := self.state.GetStateObject(ethutil.FromHex(addr))
 	if object == nil {
-		object = state.NewStateObject(fromHex(addr), self.xeth.eth.StateDb())
+		object = state.NewStateObject(ethutil.FromHex(addr), self.xeth.eth.StateDb())
 	}
 
 	return object
diff --git a/xeth/types.go b/xeth/types.go
index 5b2d16018019426d7b4354467cfe398ef6c9c330..3dc25a2ea67cdbb8e5e640604e1c80c211b4f9a9 100644
--- a/xeth/types.go
+++ b/xeth/types.go
@@ -17,15 +17,6 @@ import (
 func toHex(b []byte) string {
 	return "0x" + ethutil.Bytes2Hex(b)
 }
-func fromHex(s string) []byte {
-	if len(s) > 1 {
-		if s[0:2] == "0x" {
-			s = s[2:]
-		}
-		return ethutil.Hex2Bytes(s)
-	}
-	return nil
-}
 
 type Object struct {
 	*state.StateObject
@@ -123,7 +114,7 @@ func (self *Block) ToString() string {
 }
 
 func (self *Block) GetTransaction(hash string) *Transaction {
-	tx := self.ref.Transaction(fromHex(hash))
+	tx := self.ref.Transaction(ethutil.FromHex(hash))
 	if tx == nil {
 		return nil
 	}
diff --git a/xeth/whisper.go b/xeth/whisper.go
index d9c7e1614074b8217437f582957afc1dccbdf441..f5c26faaef91171a169b16e3044c79b26084ce38 100644
--- a/xeth/whisper.go
+++ b/xeth/whisper.go
@@ -5,6 +5,7 @@ import (
 	"time"
 
 	"github.com/ethereum/go-ethereum/crypto"
+	"github.com/ethereum/go-ethereum/ethutil"
 	"github.com/ethereum/go-ethereum/logger"
 	"github.com/ethereum/go-ethereum/whisper"
 )
@@ -28,12 +29,12 @@ func (self *Whisper) Post(payload string, to, from string, topics []string, prio
 		ttl = 100
 	}
 
-	pk := crypto.ToECDSAPub(fromHex(from))
+	pk := crypto.ToECDSAPub(ethutil.FromHex(from))
 	if key := self.Whisper.GetIdentity(pk); key != nil || len(from) == 0 {
-		msg := whisper.NewMessage(fromHex(payload))
+		msg := whisper.NewMessage(ethutil.FromHex(payload))
 		envelope, err := msg.Seal(time.Duration(priority*100000), whisper.Opts{
 			Ttl:    time.Duration(ttl) * time.Second,
-			To:     crypto.ToECDSAPub(fromHex(to)),
+			To:     crypto.ToECDSAPub(ethutil.FromHex(to)),
 			From:   key,
 			Topics: whisper.TopicsFromString(topics...),
 		})
@@ -59,13 +60,13 @@ func (self *Whisper) NewIdentity() string {
 }
 
 func (self *Whisper) HasIdentity(key string) bool {
-	return self.Whisper.HasIdentity(crypto.ToECDSAPub(fromHex(key)))
+	return self.Whisper.HasIdentity(crypto.ToECDSAPub(ethutil.FromHex(key)))
 }
 
 func (self *Whisper) Watch(opts *Options) int {
 	filter := whisper.Filter{
-		To:     crypto.ToECDSAPub(fromHex(opts.To)),
-		From:   crypto.ToECDSAPub(fromHex(opts.From)),
+		To:     crypto.ToECDSAPub(ethutil.FromHex(opts.To)),
+		From:   crypto.ToECDSAPub(ethutil.FromHex(opts.From)),
 		Topics: whisper.TopicsFromString(opts.Topics...),
 	}
 
diff --git a/xeth/xeth.go b/xeth/xeth.go
index 4e8b479c6e406d9c40ff85175a4e6b59a6636e81..cf500cd593dcf4cfe767b80f6325f1dd76fe5d2b 100644
--- a/xeth/xeth.go
+++ b/xeth/xeth.go
@@ -116,21 +116,21 @@ func (self *XEth) State() *State { return self.state }
 func (self *XEth) Whisper() *Whisper { return self.whisper }
 
 func (self *XEth) BlockByHash(strHash string) *Block {
-	hash := fromHex(strHash)
+	hash := ethutil.FromHex(strHash)
 	block := self.chainManager.GetBlock(hash)
 
 	return NewBlock(block)
 }
 
 func (self *XEth) EthBlockByHash(strHash string) *types.Block {
-	hash := fromHex(strHash)
+	hash := ethutil.FromHex(strHash)
 	block := self.chainManager.GetBlock(hash)
 
 	return block
 }
 
 func (self *XEth) EthTransactionByHash(hash string) *types.Transaction {
-	data, _ := self.eth.ExtraDb().Get(fromHex(hash))
+	data, _ := self.eth.ExtraDb().Get(ethutil.FromHex(hash))
 	if len(data) != 0 {
 		return types.NewTransactionFromBytes(data)
 	}
@@ -233,7 +233,7 @@ func (self *XEth) IsContract(address string) bool {
 }
 
 func (self *XEth) SecretToAddress(key string) string {
-	pair, err := crypto.NewKeyPairFromSec(fromHex(key))
+	pair, err := crypto.NewKeyPairFromSec(ethutil.FromHex(key))
 	if err != nil {
 		return ""
 	}
@@ -273,7 +273,7 @@ func (self *XEth) FromAscii(str string) string {
 		str = str[2:]
 	}
 
-	return string(bytes.Trim(fromHex(str), "\x00"))
+	return string(bytes.Trim(ethutil.FromHex(str), "\x00"))
 }
 
 func (self *XEth) FromNumber(str string) string {
@@ -281,11 +281,11 @@ func (self *XEth) FromNumber(str string) string {
 		str = str[2:]
 	}
 
-	return ethutil.BigD(fromHex(str)).String()
+	return ethutil.BigD(ethutil.FromHex(str)).String()
 }
 
 func (self *XEth) PushTx(encodedTx string) (string, error) {
-	tx := types.NewTransactionFromBytes(fromHex(encodedTx))
+	tx := types.NewTransactionFromBytes(ethutil.FromHex(encodedTx))
 	err := self.eth.TxPool().Add(tx)
 	if err != nil {
 		return "", err
@@ -306,12 +306,12 @@ var (
 func (self *XEth) Call(fromStr, toStr, valueStr, gasStr, gasPriceStr, dataStr string) (string, error) {
 	statedb := self.State().State() //self.chainManager.TransState()
 	msg := callmsg{
-		from:     statedb.GetOrNewStateObject(fromHex(fromStr)),
-		to:       fromHex(toStr),
+		from:     statedb.GetOrNewStateObject(ethutil.FromHex(fromStr)),
+		to:       ethutil.FromHex(toStr),
 		gas:      ethutil.Big(gasStr),
 		gasPrice: ethutil.Big(gasPriceStr),
 		value:    ethutil.Big(valueStr),
-		data:     fromHex(dataStr),
+		data:     ethutil.FromHex(dataStr),
 	}
 	if msg.gas.Cmp(big.NewInt(0)) == 0 {
 		msg.gas = defaultGas
@@ -339,9 +339,9 @@ func (self *XEth) Transact(fromStr, toStr, valueStr, gasStr, gasPriceStr, codeSt
 		contractCreation bool
 	)
 
-	from = fromHex(fromStr)
-	data = fromHex(codeStr)
-	to = fromHex(toStr)
+	from = ethutil.FromHex(fromStr)
+	data = ethutil.FromHex(codeStr)
+	to = ethutil.FromHex(toStr)
 	if len(to) == 0 {
 		contractCreation = true
 	}