What you need is the -c option.
# echo -n "this is a long line and xxd will print it as one line" | xxd -p -c 1000000
746869732069732061206c6f6e67206c696e6520616e64207878642077696c6c207072696e74206974206173206f6e65206c696e65
Here is some info from the documentation:
-c cols | -cols cols format octets per line. Default 16
(-i: 12, -ps: 30, -b: 6). Max 256.
Documentation says that the max value for "c" parameter is 256, but I tried greater values and it worked. Check it out:
# xxd -c 1000000 -p -l 1000000 /dev/urandom | wc -c
2000001
Here I dump one million bytes from /dev/random and I get a string of 2 million + 1 characters. Each byte from /dev/random is represented by 2 characters and additional byte is the final newline.