Manchester code
Encode a bit stream into Manchester line code, or decode one back to its original bits.
Manchester code
Manchester code is a line coding scheme where every data bit is sent as a pair of signal levels, so a clock transition happens in the middle of each bit. This tool converts a bit stream to Manchester code and back, using the common convention where a 0 becomes 01 and a 1 becomes 10 — the G.E. Thomas convention used in most protocol teaching examples. IEEE 802.3 Ethernet defines the mapping the other way round, so a 10BASE-T capture reads inverted here.
Pick a direction: encoding turns your data into its Manchester-coded form, decoding reverses a coded stream back to the original bits. The input format tells the tool how to read what you paste — plain text (UTF-8 bytes become bits), hex (digit pairs become bytes), or raw bits (a string of 0s and 1s). Output format works the same way in reverse, so you can encode text and view the result as bits, or decode a bit stream and read the answer as text or hex.
Manchester code always doubles the bit count, so the coded stream does not automatically land on a byte boundary when the source is a raw bit string. Keep padding on to zero-pad an incomplete final byte for hex or text output, or turn it off to drop those trailing bits. Long results wrap at a fixed line width, and any character outside what the chosen format allows — a stray letter in a hex field, a digit other than 0 or 1 in a bit string — is reported with its exact position. CRLF and LF are preserved exactly as typed.
Everything runs locally in your browser; nothing you paste is uploaded anywhere. Copy the result, download it as a .txt file, or send the output back into the input to decode what you just encoded.