Swap endianness

Switches the data from big-endian to little-endian or vice-versa. Data can be read in as hexadecimal or raw bytes.

Input: TextResult: Text

Text input

Tool options

Examples

Reproduce the Bitcoin genesis block ID from its 80-byte header — step 3

Demonstrate double SHA-256, hashing decoded bytes rather than hash text, and displayed byte order.

Input

6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000

Expected answer

00 00 00 00 00 19 d6 68 9c 08 5a e1 65 83 1e 93 4f f7 63 ae 46 a2 a6 c1 72 b3 f1 b6 0a 8c e2 6f
Data format
Hex
Word length (bytes)
32
Pad incomplete words
On
An alphabet fixture

An alphabet fixture. Inspect exact byte compatibility. A legacy digest or a passing fixture does not establish that an algorithm is suitable for new security designs.

Input

6162636465666768

Expected answer

64 63 62 61 68 67 66 65
Data format
Hex
Word length (bytes)
4
Pad incomplete words
On
A repeated byte fixture

A repeated byte fixture. Inspect exact byte compatibility. A legacy digest or a passing fixture does not establish that an algorithm is suitable for new security designs.

Input

414141414141414142424242

Expected answer

41 41 41 41 41 41 41 41 42 42 42 42
Data format
Hex
Word length (bytes)
4
Pad incomplete words
On
A small counter fixture

A small counter fixture. Inspect exact byte compatibility. A legacy digest or a passing fixture does not establish that an algorithm is suitable for new security designs.

Input

000102030405060708090a0b0c0d0e0f

Expected answer

03 02 01 00 07 06 05 04 0b 0a 09 08 0f 0e 0d 0c
Data format
Hex
Word length (bytes)
4
Pad incomplete words
On
An odd-length fixture

An odd-length fixture. Inspect exact byte compatibility. A legacy digest or a passing fixture does not establish that an algorithm is suitable for new security designs.

Input

6f6464206279746573000000

Expected answer

20 64 64 6f 65 74 79 62 00 00 00 73
Data format
Hex
Word length (bytes)
4
Pad incomplete words
On
A short little-endian fixture

A short little-endian fixture. Inspect exact byte compatibility. A legacy digest or a passing fixture does not establish that an algorithm is suitable for new security designs.

Input

01000200

Expected answer

00 02 00 01
Data format
Hex
Word length (bytes)
4
Pad incomplete words
On

It will be returned in the same format as it is entered.

Format reference: Swap endianness background and specification

Parameters

ParameterDefault valueInput and choices
Data formatHexHex, Raw
Word length (bytes)4Number
Pad incomplete wordstrueOn or off

Related tools

Browse data format tools