How to convert my binary text file into text file.
c# - convert binary file to text - Stack Overflow
linux - How to convert "binary text" to "visible text"? - Stack Overflow
notepad++ handling / converting binary command characters - Stack Overflow
Videos
I have a code which written in binary type but I want to convert my code into writing the same data into .txt files. Please help me I don’t know how to do this
In what format is the response you get? There is no such thing as a text file. There are only binary files. HTTP is also 100% binary.
Text is the interpretation of bytes, and it only exists as part of running application. You can never, ever write text to a file. You can only convert the text to bytes (using various ways) and write the bytes.
Therefore, ask yourself why the bytes you received cannot be interpreted by notepad.exe as text. Maybe the response is not directly text but a ZIP file or something.
- You can guess the format with a hex editor
- You can ask the website owner
You don't show in your code sample saving the file anywhere.
But to convert the response to string you can use:
using (HttpWebResponse response = req.GetResponse() as HttpWebResponse)
{
StreamReader reader = new StreamReader(response.GetResponseStream());
string ResponseTXT = reader.ReadToEnd();
}
Then you can save it with usual techniques http://msdn.microsoft.com/en-us/library/6ka1wd3w%28v=vs.110%29.aspx
Did you mean that?
In the Edit menu of Notepad++ (I'm using v5.9.2) under Paste Special there are actions to Copy, Cut, and Paste Binary Content.

The Notepad++ MIME Tools plugin and Base64 Encode/Decode feature can be used to copy small binary files (typically small jar or zip files) between remote systems using the clipboard.
- Open the Binary file binary1.bin in Notepad++
- Edit -> Select All (Ctrl+A)
- Plugins -> MIME Tools -> Base64 Encode
- Edit -> Select All (Ctrl+A)
- Edit -> Copy (Ctrl+C)
- Edit -> Undo (Ctrl+Z)
- Move focus to a new Notepad++ tab
- Edit -> Paste (Ctrl+v)
- Edit -> Select All (Ctrl+A)
- Plugins -> MIME Tools -> Base64 Decode
- File -> Save As... binary2.bin

Hello all, I apologize in advance for not knowing what subreddit to post this in. It's something that could fit in one of many subs. But I'll start here.
So basically I'm working on a project that outputs a random stream of bits, concatenates 8 bits into a byte, and outputs a stream of those bytes (via serial) as space-delimited bytes to be saved to a file (by PuTTY). Here is an example of the output:
01100110 01011100 00110001 10100111
But I'm running into an issue with the encoding of the file. The binary byte stream looks as if it is being saved to a text file as ASCII; a bit of 1 is being saved as a ASCII 1 and not a binary bit of 1. So when I change the .TXT to .BIN and open it in Notepad++, it looks like this:
01100110 01011100 00110001 10100111 01111001 00101100 00001000 10100100 11010111 01110100 10100101 00010100 10011010 11110001 00101110 10110000
But when I open other .BIN files in Notepad++, the output looks like this:
ÅÈmÜSŒkûVéïôZØàMÊ{k¥4E5ÇgP[EžôS‰tý4'ÿ‘f@©Ï‡VÖíqCá6ô™‰»Æ|NÅ»õüòÖ¤‹ržê~½K‹£oº›"}¤ÚD$îfÚë|«‘Øÿ[€f/
So my question is how can I properly encode the .BIN file so the binary byte stream is saved/encoded as the binary it is?