# sed is intended to be used on line-based input. Although it can do what you need.
#A better option here is to use the tr command as follows:
tr '
' ' ' < input_filename
#or remove the newline characters entirely:
tr -d '
' < input.txt > output.txt
#or if you have the GNU version (with its long options)
tr --delete '
' < input.txt > output.txt