Use curl -I https://example.com to ask a server for headers only, or curl -i https://example.com to make a normal request and show the response headers before the body. To save headers separately from the response body, use curl -D headers.txt https://example.com. The key difference is that -I sends a HEAD request, while -i sends the usual GET request and includes its response headers in the output.
Choose the cURL option that matches what you need
cURL normally hides HTTP response headers and writes the response body to standard output. The right option depends on whether you need only the headers, the headers and body together, a separate header file, or a diagnostic trace.
| Command | Request and output | Best for |
|---|---|---|
curl -I https://example.com |
Sends HEAD; displays response headers without the body. | A quick header check when the server supports HEAD. |
curl -i https://example.com |
Sends a normal request; displays response headers and body together. | Checking headers for the same GET request that returns the page. |
curl -D headers.txt https://example.com |
Sends a normal request; saves headers to a file and writes the body to standard output. | Keeping headers separate from a body you want to save or process. |
curl -v https://example.com |
Shows request and response headers plus connection diagnostics. | Debugging the exchange, not just reading response headers. |
Replace https://example.com with the URL you are investigating. These options are available in the curl command-line tool; the exact display also depends on whether you send output to a terminal, redirect it, or save it to a file.
Show headers only with -I or --head
Run:
curl -I https://example.com
This makes an HTTP HEAD request and prints the response headers without downloading the response body. The long form is equivalent:
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →#1 Best Overall
- 𝐇𝐢𝐠𝐡-𝐒𝐩𝐞𝐞𝐝 𝐔𝐒𝐁 𝐄𝐭𝐡𝐞𝐫𝐧𝐞𝐭 𝐀𝐝𝐚𝐩𝐭𝐞𝐫 - UE306 is a USB 3.0 Type-A to RJ45 Ethernet adapter that adds a reliable wired network port to your laptop, tablet, or Ultrabook. It delivers fast and stable 10/100/1000 Mbps wired connections to your computer or tablet via a router or network switch, making it ideal for file transfers, HD video streaming, online gaming, and video conferencing.
- 𝐔𝐒𝐁 𝟑.𝟎 𝐟𝐨𝐫 𝐅𝐚𝐬𝐭𝐞𝐫, 𝐌𝐨𝐫𝐞 𝐒𝐭𝐚𝐛𝐥𝐞 𝐃𝐚𝐭𝐚 𝐓𝐫𝐚𝐧𝐬𝐟𝐞𝐫𝐬- Powered via USB 3.0, this adapter provides high-speed Gigabit Ethernet without the need for external power(10/100/1000Mbps). Backward compatible with USB 2.0/1.1, it ensures reliable performance across a wide range of devices.
- 𝐒𝐮𝐩𝐩𝐨𝐫𝐭𝐬 𝐍𝐢𝐧𝐭𝐞𝐧𝐝𝐨 𝐒𝐰𝐢𝐭𝐜𝐡- Easily connect your Nintendo Switch to a wired network for faster downloads and a more stable online gaming experience compared to Wi-Fi.
- 𝐏𝐥𝐮𝐠 𝐚𝐧𝐝 𝐏𝐥𝐚𝐲- No driver required for Nintendo Switch, Windows 11/10/8.1/8, and Linux. Simply connect and enjoy instant wired internet access without complicated setup.
- 𝐁𝐫𝐨𝐚𝐝 𝐃𝐞𝐯𝐢𝐜𝐞 𝐂𝐨𝐦𝐩𝐚𝐭𝐢𝐛𝐢𝐥𝐢𝐭𝐲- Supports Nintendo Switch, PCs, laptops, Ultrabooks, tablets, and other USB-powered web devices; works with network equipment including modems, routers, and switches.
curl --head https://example.com
A HEAD request is useful for a quick look at response metadata such as the status line, content type, caching fields, or last-modified value. It is not exactly the same request as GET: a server or application may respond differently to HEAD, and some servers reject it. If your goal is to inspect headers returned for an ordinary page request, prefer -i or -D.
Show headers and body with -i
Use -i, also called --show-headers, to make a normal request and include its response headers in the output:
curl -i https://example.com
The response headers and body share the output stream, with the headers appearing before the body. This is often the quickest way to see the headers from a GET request, but it can be awkward when the body is long, binary, or needs to be saved separately.
The long option is:
curl --show-headers https://example.com
Use this when you want to inspect both the metadata and the returned content in one response. For a machine-readable script or a clean separation between headers and body, use the methods below instead.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsRank #2
- Connects a USB 3.0 device (computer/laptop) to a router, modem, or network switch to deliver Gigabit Ethernet to your network connection. Does not support Smart TV or gaming consoles (e.g.Nintendo Switch).
- Supported features include Wake-on-LAN function, Green Ethernet & IEEE 802.3az-2010 (Energy Efficient Ethernet)
- Supports IPv4/IPv6 pack Checksum Offload Engine (COE) to reduce Cental Processing Unit (CPU) loading
- Compatible with Windows 8.1 or higher, Mac OS
Save headers separately from the response body
-D (long form --dump-header) writes response headers to a file while leaving the body on its usual output stream:
curl -D headers.txt https://example.com
After the request, headers.txt contains the headers and the response body has been written to standard output. To save the body to a file too, add -o:
curl -D headers.txt -o body.html https://example.com
To send the headers to standard output instead of a file, use a hyphen as the dump-header destination:
curl -D - https://example.com -o body.html
That form prints headers to the terminal while saving the body as body.html. It is handy for a human check without mixing an HTML response into the terminal output.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
- COMPACT DESIGN - The compact-designed portable BENFEI USB A/C to Ethernet adapter connects your computer or tablet to a router,modem or network switch for network connection. It adds a standard RJ45 port to your Ultrabook, notebook or Macbook Air for file transferring, video conferencing, gaming, and HD video streaming.
- SUPERIOR STABILITY - Built-in advanced IC chip works as the bridge between RJ45 Ethernet cable and your USB A/C devices. The driver-free installation with native driver support in Chrome, Mac, and Windows OS; The USB A/C Ethernet adapter dongle supports important performance features including Wake-on-Lan (WoL), Full-Duplex (FDX) and Half-Duplex (HDX) Ethernet, Crossover Detection, Backpressure Routing, Auto-Correction (Auto MDIX).
- INCREDIBLE PERFORMANCE - Supports full 10/100/1000Mbps gigabit ethernet performance over USB A/C's 5Gbps bus, faster and more reliable than most wireless connections. Link and Activity LEDs. USB powered, no external power required. Backward compatible with USB 2.0/1.1.✅ To reach 1Gbps, make sure to use CAT6 & up Ethernet cables.
- BROAD COMPATIBILITY - The USB A/C-Ethernet adapter is compatible with Windows 11/10/8.1/8/7/Vista/XP, Mac OSX 10.6/10.7/10.8/10.9/10.10/10.11/10.12, Linux kernel 3.x/2.6, Android and Chrome OS.Compatible with IEEE 802.3, IEEE 802.3u and IEEE 802.3ab. Supports IEEE 802.3az (Energy Efficient Ethernet).❌Do Not Support Windows RT. (NOT compatible with Nintendo Switch.)
- 18 MONTH WARRANTY - Exclusive BENFEI Unconditional 18-month Warranty ensures long-time satisfaction of your purchase; Friendly and easy-to-reach customer service to solve your problems timely.
Use cURL in scripts to extract status and headers
For a status-code-only check, combine silent mode with --write-out:
curl -sS -o /dev/null -w '%{http_code}n' https://example.com
-o /dev/null discards the body on Unix-like systems, while -w prints the numerical HTTP response code after the transfer. -sS suppresses the usual progress meter but still allows error messages to be shown. On Windows, use the platform’s null device or save the body to a file if /dev/null is not available in your shell.
Current curl manuals also document %header{name} for selecting a response header and header_json for a JSON object of response headers from the most recent transfer. For example, a curl version that supports these write-out variables can print a status and a selected header as follows:
curl -sS -o /dev/null -w 'status=%{http_code}ncontent-type=%header{content-type}n' https://example.com
Variable availability depends on the curl version installed. If a variable is not recognized, check the local curl manual and use -D headers.txt as a portable fallback for collecting headers. Treat header names case-insensitively; choose the field name you need, such as content-type, and quote the format string so your shell passes it to curl as one argument.
Rank #4
- The Anker Advantage: Join the 65 million+ powered by our leading technology.
- Instant Internet: Connect to the internet instantly from virtually any USB-C 3.0 device, and enjoy stable connection speeds of up to 1 Gbps.
- Lightweight and Compact: The space-saving and portable design measures just over half an inch thick and weighs about the same as a AA battery.
- Premium Build: Features a sleek aluminum exterior and braided-nylon cable to complement the design of high-end devices.
- What You Get: PowerExpand USB-C to Gigabit Ethernet Adapter, welcome guide, 18-month worry-free warranty, and friendly customer service.
Use -v when you need to debug the exchange
Run:
curl -v https://example.com
Verbose mode shows more than the response headers: lines prefixed with > are headers curl sent, lines prefixed with < are headers it received, and lines prefixed with * are additional connection and protocol diagnostics. This distinction helps when you need to check whether a request header was sent or how the server replied.
Verbose output is diagnostic text, not a clean header-only result. It may include details about the connection and request, so use -i or -D when your goal is simply to display or capture HTTP response headers.
Handle redirects and multiple response blocks
A redirect can produce an intermediate response followed by the final response. If you want curl to follow redirects, add -L:
curl -i -L https://example.com
With header output enabled, you may see headers for more than one response, such as the redirect and the destination response. That is useful when diagnosing a redirect chain. If you only need to know what the original URL returns, omit -L. Do not mistake an intermediate redirect status for the final status after following redirects.
Best Value
- Dual USB-A/C Port Design: This USB hub with ethernet adapter features dual connectors for both USB C and USB A devices, ensuring wide compatibility across laptops, tablets, and smartphones. It includes 1x Gigabit Ethernet port and 3x USB A 3.0 ports, all usable at the same time for smooth and efficient connectivity. 📌Note: When using USB-A to connect devices, please ensure the USB-C is securely attached to the USB-A connector.
- Stable Gigabit Ethernet Adapter: Get fast, wired Internet up to 1000Mbps with this USB C to ethernet adapter. Backward compatible with 10/100Mbps networks for flexible connectivity across various setups. Ideal for streaming, gaming, and large file transfers. 📌Note: Ensure the RJ45 connector is plugged in securely in the port and use CAT6 & above Ethernet cable is required to reach 1 Gbps.
- 5Gbps Data Transfer: Transfer large files, photos, and videos in seconds with this USB 3.0 hub supporting speeds up to 5Gbps—10× faster than USB 2.0. Backward compatible with USB 2.0 and 1.1 devices, this USB splitter expands one port into three for connecting keyboards, mice, and flash drives for everyday use. 📌Note: The three USB-A 3.0 ports share a total 5Gbps bandwidth.【NO HDMI port, NO USB-C data port, and NO PD charging】
- Plug and Play: Reliable USB to ethernet adapter ready to use in seconds. Instantly connects with USB-A and USB-C devices including MacBook Pro/Air, iPad Pro, iMac, Surface Laptops, Chromebook, XPS, tablets, Steam, and smartphones. Works with Windows, macOS, Linux, Chrome OS, and Android. 📌XP/Win7 may need driver. Older systems may not recognize this product due to its USB 3.0 chip. Please refer to the “Installation Manual” to manually download and install the driver.
- Durable & Portable Build: Made with sturdy aluminum alloy, this RJ45 to USB-C adapter delivers long-term durability, efficient heat dissipation, and stable performance for offices, corporate deployments, classrooms, and campus workstations—while its slim, portable form factor makes it ideal for business travel, educators, and mobile professionals.
Similarly, a proxy or authentication negotiation can result in more than one header block. When saving headers to a file, inspect the full file rather than assuming it contains just one status line.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshoot common cURL header problems
curl -Ireturns an error or an unexpected result: The server may not support HEAD or may handle it differently from GET. Retry withcurl -i https://example.comto inspect a normal request’s response headers.- The body appears alongside the headers: That is expected with
-i. Use-D headers.txt -o body.htmlto separate them, or-Iwhen a HEAD request is suitable. - The terminal fills with page content: A normal curl request writes the body to standard output. Add
-o body.htmlto save it, or-o /dev/nullon Unix-like systems to discard it while using-D -to display headers. - You cannot tell sent headers from received headers: Use
-v; sent headers begin with>and received headers with<. For response headers alone, use-Dor-i. - Your script cannot parse the output cleanly: Avoid parsing the combined
-istream if the body can contain arbitrary content. Capture headers with-D, or use supported--write-outvariables for the status and selected fields. - A write-out header variable is rejected: The installed curl version may not support that variable. Check the local manual or dump headers to a file with
-D.
Or skip the browser setup
If your real task is to capture a web page as an image or PDF rather than inspect an arbitrary site’s response, ScreenshotNeo provides a screenshot API. Its response includes X-Page-Verdict and X-Billed headers, which you can inspect with cURL’s header options. For example, this one-call request saves a screenshot:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request details. ScreenshotNeo accepts cookie or consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and the response identifies the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. There are 1,000 screenshots per month on the free plan with no card required; paid plans start at $5 for 3,000 screenshots.
Sign up for ScreenshotNeo’s free plan to try it with 1,000 screenshots a month and no card.
Check curl’s documented option behavior
The curl project documentation explains the difference between the HEAD request made by -I, the included response headers produced by -i, and the separate output available through -D. Its HTTP scripting guidance also notes that some servers deny HEAD while still serving GET. For debugging, the curl manual describes the <, >, and * markers in verbose output. Consult the manual installed with your curl version when using newer write-out fields such as %header{name} or header_json.
Frequently Asked Questions
Does curl -I download the response body?
No. It sends a HEAD request, which asks for headers without the body. Use -i when you need headers from a normal request that also returns content.
Can I show headers and save the body without mixing them?
Yes. Use curl -D headers.txt -o body.html https://example.com to save the two streams separately.
How do I check only the HTTP status code?
Use curl’s --write-out output format with %{http_code}; for example, curl -sS -o /dev/null -w '%{http_code}n' https://example.com on Unix-like systems.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

