Skip to main content
The ngrok agent ships with a realtime inspection interface which allows you to see what traffic is sent to your upstream service and what responses it is returning. The Web Inspection Interface is only available in the ngrok standalone agent and not in the ngrok Agent SDKs. If you are interested in viewing traffic across all endpoints, longer retention periods, or sharing traffic events with other teammates, check out the Traffic Inspector in the ngrok Dashboard instead.

Inspecting requests

Every HTTP request through your endpoints will be displayed in the inspection interface. After you start the ngrok agent, open http://localhost:4040 in a browser on the same machine. You will see all of the details of every request and response including the time, duration, source IP, headers, query parameters, request payload and response body as well as the raw bytes on the wire. The inspection interface has a few limitations. If an entity-body is too long, ngrok may only capture the initial portion of the request body. Furthermore, ngrok does not display provisional 100 responses from a server. Inspection is only supported for HTTP endpoints. TCP and TLS endpoints do not support any inspection and will not show up in the inspection interface.
Detailed introspection of HTTP requests and responses
ngrok agent web inspection interface showing HTTP request and response detail with Summary, Headers, Raw, and Binary tabs

Request body validation

ngrok has special support for the most common data interchange formats in use on the web. Any XML or JSON data in request or response bodies is automatically pretty-printed and checked for syntax errors.
The location of a JSON syntax error is highlighted
ngrok web inspection interface showing a JSON syntax error with the problematic key highlighted in orange

Filtering requests

Your upstream service may receive many requests, but you are often only interested in inspecting some of them. You can filter the requests that ngrok displays to you. You can filter based on the request path, response status code, size of the response body, duration of the request and the value of any header.
Click the filter bar for filtering options
ngrok web inspection interface filter dropdown showing options including Path, ResponseSize, and StatusCode You may specify multiple filters. If you do, requests will only be shown if they much all filters.
Filter requests by path and status code
ngrok web inspection interface showing filtered requests matching path and status code filters with one result

Replaying requests

Developing for webhooks issued by external APIs can often slow down your development cycle by requiring you do some work, like dialing a phone, to trigger the hook request. ngrok allows you to replay any request with a single click, dramatically speeding up your iteration cycle. Click the Replay button at the top-right corner of any request on the web inspection UI to replay it. Replay works via the local agent sending the request directly to your upstream service. As such, the replayed request will not be subject to any policies that exist on your Cloud Endpoint since those are applied prior to the request reaching the local agent. If you are interested in replaying the original request before the endpoint policies are applied and testing new policies, please use the Traffic Inspector in the ngrok Dashboard.
Replay any request against your web server with one click
ngrok web inspection interface showing a captured request with the Replay button in the top right corner

Replaying modified requests

Sometimes you want to modify a request before you replay it to test a new behavior in your upstream service.
Click the dropdown arrow on the ‘Replay’ button to modify a request before it is replayed
ngrok web inspection interface showing the Replay button dropdown with the Replay with Modifications option The replay editor allows you to modify every aspect of the HTTP request before replaying it, including the method, path, headers, trailers, and request body.
The request replay modification editor
ngrok web inspection Modify Request dialog showing editable method, path, headers, and body fields

ngrok Agent status page

ngrok’s local web interface has a dedicated status page that shows configuration and metrics information about the running ngrok process. You can access it at http://localhost:4040/status. The status page displays the configuration of each running endpoint and any global configuration options that ngrok has parsed from its configuration file.
Endpoint and global configuration
ngrok agent status page showing Configuration section with tunnel URLs, addresses, and global settings The status page also display metrics about the traffic through each endpoint. It display connection rates and connection duration percentiles for all endpoints. For HTTP endpoints, it also displays http request rates and http response duration percentiles.
Endpoint traffic metrics
ngrok agent status page showing Metrics section with connection counts, connection duration percentiles, and HTTP request rates