Skip to content
100% local

Manchester code

Encode a bit stream into Manchester line code, or decode one back to its original bits.

Input
Output

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.

FAQ

Which Manchester convention does this tool use?
The G.E. Thomas convention: a 0 bit is encoded as 01 and a 1 bit as 10, which is what most textbook examples use. IEEE 802.3 Ethernet defines the opposite mapping, so decode a 10BASE-T capture with the bits inverted.
What does the input format option do?
It tells the tool how to read your pasted text: as plain text (converted to bits via UTF-8), as hex digit pairs, or as a raw string of 0s and 1s. The output format controls how the result is written, independently of the input.
Why does decoding sometimes report an invalid pair?
Manchester code only ever produces the pairs 01 and 10. A pair of 00 or 11 in the input means it is not valid Manchester code, or the wrong direction was selected — the error names the exact pair and its position.
What does "Keep padding" change?
Manchester encoding doubles the bit count, which is not always a multiple of 8. With padding on, an incomplete final byte is filled with zeros so hex or text output is possible; with it off, those trailing bits are dropped instead.
Is my data uploaded anywhere?
No. Encoding and decoding both run entirely in your browser — nothing you type or paste ever leaves your device.