Find the final URL after redirects

Trace the full redirect chain of any URL. See every hop in order, the final destination, and the total number of redirects followed.

GET /api/url-resolve

Try it

{
  "input_url": "http://example.com",
  "final_url": "https://www.example.com/",
  "redirect_count": 2,
  "redirect_chain": [
    { "url": "http://example.com", "status": 301 },
    { "url": "https://example.com", "status": 301 },
    { "url": "https://www.example.com/", "status": 200 }
  ],
  "error": null
}

What it returns

Use cases

Quick API examples

curl

curl "https://tinyutils.dev/api/url-resolve?url=http://example.com"

JavaScript (fetch)

const res = await fetch(
  "https://tinyutils.dev/api/url-resolve?url=http://example.com"
);
const data = await res.json();
console.log(data.final_url, data.redirect_count);
console.log(data.redirect_chain);

Batch endpoint

Resolve up to 10 URLs in a single request using POST /api/url-resolve/batch.

curl -X POST "https://tinyutils.dev/api/url-resolve/batch" \
  -H "Content-Type: application/json" \
  -d '{"urls":["http://example.com","http://openai.com"]}'