You can fetch webpage source directly from the Android terminal using wget — no browser required.
Other options include downloading an app like VT Source Viewer, or using validator.w3.org online. But there’s something satisfying about the green terminal window.
We’re using the wget command. To see its options, run:
wget -h
Basic usage
In this example I’m fetching an Amazon page (note: this was written in 2017 — Amazon now uses HTTPS everywhere):
wget -qO- http://www.amazon.in/gp/aw/h.html/259-9514595-1626805?ie=UTF8&pc_redir=1496144718
The flags:
-q— quiet mode, suppresses progress output-O-— write output to stdout (the terminal). Note: capitalO, not zero.
You’ll get the full HTML source of the page.
Trying HTTPS sites (e.g. Facebook)
wget -qO- https://www.facebook.com
You’ll see a “Connection reset by peer” error, along with something like “SSL helper connection reset by peer.” This happens because the BusyBox version of wget on Android lacks full SSL/TLS support, so it can’t complete the HTTPS handshake. The server sends a RST packet, immediately closing the connection.
The fix is to use a proper wget via Termux:
pkg install wget -y
Most BusyBox modules are outdated, which is why SSL fails. The Termux version of wget uses a current TLS implementation and handles HTTPS correctly.
Happy hacking!



