Byte Array and Endianness Converter
Convert hex, Base64, text, decimal or a number into byte arrays for C, Java, Python, JavaScript, Go and Rust, swap the byte order of words and read bytes as integers and floats.
- Free
- No sign-up
- Works on any device
About Byte Array and Endianness Converter
Embedding binary data in source code means turning bytes into a literal, and talking to hardware or network protocols means getting the byte order right. Enter hex, Base64, UTF-8 text, a decimal list, binary digits or a single number, and the tool writes a byte array literal for C, C++, C#, Java, Kotlin, Python, JavaScript, Go or Rust in hex, decimal or binary style. It swaps bytes in 2, 4 or 8-byte words or reverses the array, and a table reads your first bytes as 16, 32 and 64-bit integers and floats in both big-endian and little-endian.
How to use Byte Array and Endianness Converter
- Choose the input format, paste the data or number and pick the language of the literal.
- Select the number style and bytes per line, and choose a byte-order swap if you need one.
- Copy the array literal and use the table to check the value in both byte orders.
Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.
Also known as
Frequently asked questions
What is the difference between big-endian and little-endian?
Big-endian stores the most significant byte first, as network protocols do. Little-endian stores it last, as x86 and most ARM systems do, so 0xDEADBEEF is written EF BE AD DE in memory.
Why does the Java output cast some values to byte?
Java bytes are signed, so literals above 127 such as 0xDE do not fit without a cast. In decimal style the tool writes signed numbers from -128 to 127 instead.
What happens if the data does not fill the last word when swapping?
The array is padded with zero bytes to complete the last word, and the result tells you how many zeros were added so you can drop them if they are not wanted.
Is Byte Array and Endianness Converter free?
Yes. Byte Array and Endianness Converter on Toolipedia is free to use, with no sign-up and no watermark.
Is it safe to use?
Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.
Does it work on my phone?
Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.
Do I need an account?
No. Just open the page and use the tool. There's no sign-up and no email needed.