Free ASP.NET Screenshot and HTML Conversion API
Compare free ASP.NET screenshot and HTML conversion APIs, then build URL, HTML, image, and PDF workflows with runnable C# examples.
Short answer: GrabzIt is the closest direct match for a free ASP.NET screenshot and HTML conversion API. Its documented .NET Standard library supports URL-to-image, HTML-to-image, URL-to-PDF, and HTML-to-PDF with a free application key and secret. SelectPdf is the main alternative when you need either an embedded .NET component or a hosted REST API. HTML2IMG and GetScreenshot.dev are hosted options with advertised free allowances.
For a new hosted integration, ScreenshotNeo is the first service to try: it removes consent banners, newsletter popups, and chat widgets before capture, bills only clean shots, and has the lowest paid plan.
What “free ASP.NET screenshot API” can mean
There are two different implementation models:
- Embedded .NET library: your ASP.NET application renders the page inside your own process or deployment. GrabzIt and SelectPdf document this approach.
- Hosted HTTP API: your application sends a URL or HTML string to a vendor and receives an image or PDF. SelectPdf, HTML2IMG, and GetScreenshot.dev document hosted APIs.
Before choosing, confirm four inputs: whether you need a public URL, raw HTML, or both; whether the output is PNG/JPEG/WebP or PDF; whether JavaScript and modern CSS must execute; and whether the free allowance is per month or a one-time quota.
Free API comparison
| Service | Integration | Inputs | Outputs | Advertised free allowance | ASP.NET fit |
|---|---|---|---|---|---|
| ScreenshotNeo | Hosted HTTP API and MCP server | URL, HTML/CSS | PNG, JPEG, WebP, PDF | 1,000 shots/month, no card | Any ASP.NET app using HTTP |
| GrabzIt | .NET Standard library and hosted service | URL, HTML, file | Image and PDF | Free application key and secret; quota depends on account terms | Explicit ASP.NET/.NET documentation |
| SelectPdf | Embedded .NET library or REST API | URL or raw HTML | PDF and image conversion | 200 free online API conversions | .NET Framework, .NET Core, .NET 5–10, ASP.NET, ASP.NET MVC |
| HTML2IMG | Hosted API | HTML, CSS, URL | PNG and PDF | 50 free renders, no card | Language-agnostic HTTP integration |
| GetScreenshot.dev | Hosted HTTP API | URL | PNG, JPEG, WebP, PDF | 500 screenshots/month, no card | Language-agnostic HTTP integration |
Vendor quotas and pricing can change. Treat the figures above as the allowances documented in the research for this guide, then verify the current terms before production use.
Option 1: GrabzIt in ASP.NET
GrabzIt’s documented ASP.NET flow uses its .NET Standard library and account credentials. The library exposes methods named URLToImage, HTMLToImage, URLToPDF, HTMLToPDF, FileToImage, and FileToPDF.
Install and configure
- Create a GrabzIt account and obtain the application key and secret.
- Add the vendor’s .NET Standard package to the ASP.NET project.
- Keep credentials in user secrets or environment variables, never in source control.
- Choose an output path that the worker process can write to.
URL to image (C#)
using GrabzIt;
var client = new GrabzItClient(
Environment.GetEnvironmentVariable("GRABZIT_APPLICATION_KEY"),
Environment.GetEnvironmentVariable("GRABZIT_APPLICATION_SECRET"));
client.URLToImage("https://example.com");
client.Save("wwwroot/captures/example.png");
HTML to image (C#)
using GrabzIt;
var html = "<html><body><h1>Invoice</h1></body></html>";
var client = new GrabzItClient(
Environment.GetEnvironmentVariable("GRABZIT_APPLICATION_KEY"),
Environment.GetEnvironmentVariable("GRABZIT_APPLICATION_SECRET"));
client.HTMLToImage(html);
client.Save("wwwroot/captures/invoice.png");
URL to PDF
client.URLToPDF("https://example.com");
client.Save("wwwroot/captures/example.pdf");
Use the library’s documented save and status flow for long renders. Do not assume that a returned task means the page has finished loading if the vendor exposes an asynchronous status check.
Option 2: SelectPdf
SelectPdf supports an embedded .NET library and a hosted REST API. Its product documentation lists .NET Framework, .NET Core, .NET 5 through 10, ASP.NET, and ASP.NET MVC support. The hosted API accepts either a URL or raw HTML. Its renderer provides controls for page size, margins, headers, footers, and page numbering.
Embedded .NET pattern
using SelectPdf;
var converter = new HtmlToPdf();
converter.Options.PdfPageSize = PdfPageSize.A4;
converter.Options.MarginTop = 20;
converter.Options.MarginBottom = 20;
var document = converter.ConvertUrl("https://example.com");
document.Save("wwwroot/captures/example.pdf");
document.Close();
Hosted REST pattern
For the hosted API, send the URL or HTML in the request body using the endpoint and authentication values from your SelectPdf account. Keep the request wrapper behind an ASP.NET service interface so you can change providers without changing controllers.
Option 3: HTML2IMG and GetScreenshot.dev
HTML2IMG converts HTML, CSS, or a URL to PNG or PDF and documents 50 free renders without a credit card. Its documentation lists SDKs for PHP, JavaScript, Python, and Ruby; ASP.NET can call it with ordinary HTTP.
GetScreenshot.dev advertises 500 free screenshots per month without a credit card, with PNG, JPEG, WebP, and PDF output. It is suited to a simple URL-in, image-or-PDF-out workflow.
Generic ASP.NET HTTP client
using System.Net.Http.Headers;
using System.Text.Json;
public sealed class RenderClient
{
private readonly HttpClient _http;
public RenderClient(HttpClient http) => _http = http;
public async Task<byte[]> CaptureAsync(
string endpoint, string apiKey, string url, CancellationToken ct)
{
using var request = new HttpRequestMessage(HttpMethod.Get, endpoint);
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", apiKey);
request.RequestUri = new Uri(endpoint + "?url=" + Uri.EscapeDataString(url));
using var response = await _http.SendAsync(request, ct);
response.EnsureSuccessStatusCode();
return await response.Content.ReadAsByteArrayAsync(ct);
}
}
Replace the endpoint, authentication header, and parameter names with the provider’s current documentation. URL-encode every URL and stream large PDFs instead of buffering them in memory.
ASP.NET endpoint that returns a capture
[ApiController]
[Route("api/captures")]
public sealed class CapturesController : ControllerBase
{
private readonly RenderClient _renderer;
public CapturesController(RenderClient renderer) => _renderer = renderer;
[HttpGet]
public async Task<IActionResult> Get([FromQuery] string url, CancellationToken ct)
{
if (!Uri.TryCreate(url, UriKind.Absolute, out var parsed) ||
parsed.Scheme is not ("http" or "https"))
return BadRequest("url must be an absolute HTTP or HTTPS URL");
var bytes = await _renderer.CaptureAsync(
Environment.GetEnvironmentVariable("RENDER_ENDPOINT")!,
Environment.GetEnvironmentVariable("RENDER_API_KEY")!,
url, ct);
return File(bytes, "image/png", "capture.png");
}
}
Register the client with AddHttpClient<RenderClient>, set an explicit timeout, and apply authentication and authorization to your own endpoint. Never proxy arbitrary internal URLs without an allowlist; otherwise your endpoint can become an SSRF relay.
Or skip the browser setup
ScreenshotNeo provides one HTTP request for a URL and returns PNG, JPEG, WebP, or PDF. See the ScreenshotNeo API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
Cookie banners, newsletter popups, and chat widgets are removed before the shot. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing result. An MCP server lets Claude, Cursor, and other MCP clients call take_screenshot, get_page_info, and capture_pdf. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
Useful capture controls
When comparing providers, map these requirements explicitly:
- Page scope: full-page capture, viewport capture, or one element selected by CSS.
- Rendering: JavaScript execution, network-idle waits, selector waits, fixed delays, and lazy-image loading.
- Appearance: viewport size, device preset, retina scale, dark mode, timezone, geolocation, and transparent background.
- Content control: custom CSS and JavaScript, click actions, hidden selectors, custom headers, cookies, user agent, and Authorization.
- Network control: block ads, trackers, specific requests, or resource types.
- Output: PNG, JPEG, WebP, PDF paper size, margins, landscape mode, page ranges, and image resizing.
- Operations: cache TTL, signed public links, asynchronous jobs, signed webhooks, bulk capture, usage API, and OpenAPI specification.
Reliability and performance checklist
- Set a client timeout longer than the expected page load and pass cancellation tokens from ASP.NET requests.
- Wait for a stable selector or network idle when JavaScript builds the page; fixed sleeps are less reliable.
- Use retries only for transient transport failures. Do not blindly retry authentication errors or deterministic invalid URLs.
- Cache identical captures with a TTL when the source changes infrequently.
- Queue slow or high-volume jobs instead of tying up web request threads.
- Limit concurrent browser renders and apply back-pressure to protect both your app and the provider quota.
- Record output type, status code, render duration, provider request ID, and byte size for diagnosis.
- For PDFs, stream the response and avoid loading many large documents into memory simultaneously.
Common errors and fixes
| Error | Likely cause | Fix |
|---|---|---|
| 401 or 403 | Missing, expired, or misplaced credentials | Read the key from a secret store, send the authentication format required by the provider, and check account status. |
| 400 invalid URL | Relative URL, unescaped query string, or unsupported scheme | Require an absolute HTTP/HTTPS URL and URL-encode it. |
| Blank image | Page needs JavaScript, authentication, or a longer wait | Enable JavaScript, provide cookies or headers, and wait for a selector or network idle. |
| Missing images | Lazy loading has not triggered or resources are blocked | Use full-page capture with lazy-image loading, scroll behavior, or an appropriate resource policy. |
| Cookie banner in output | Consent UI was not dismissed | Use a provider with consent handling, add a click action, or hide the banner selector. |
| Different fonts or layout | Font files are unavailable or viewport differs | Make fonts reachable to the renderer and set the intended viewport and device scale. |
| Timeout | Slow third-party scripts, blocked resource, or infinite request | Block unnecessary resources, increase the timeout within provider limits, and inspect network dependencies. |
| PDF page breaks are wrong | Content has no print CSS or margins are unsuitable | Add print styles, set paper size and margins, and test page ranges. |
| ASP.NET request stalls | Synchronous rendering on the request thread | Use async APIs, cancellation tokens, and a background queue for long jobs. |
Cost and quota planning
Separate free allowances by type: SelectPdf documents 200 free online API conversions, HTML2IMG documents 50 free renders, and GetScreenshot.dev advertises 500 screenshots per month. A conversion may consume a credit even when the output is a PDF rather than an image, so read each provider’s quota definition.
ScreenshotNeo’s plans are Free: 1,000 shots/month; Starter: $5 for 3,000; Growth: $15 for 15,000; Pro: $39 for 60,000; Scale: $99 for 250,000; and Business: $249 for 1,000,000. Yearly billing gives two months free, and every feature is included on every plan. Only clean shots are billed; bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing.
Which option should you choose?
- Choose GrabzIt when an ASP.NET-specific .NET Standard library and URL/HTML image and PDF methods are the priority.
- Choose SelectPdf when you need a choice between embedded .NET deployment and a hosted REST API, plus PDF layout controls.
- Choose HTML2IMG for a small hosted HTML/CSS/URL renderer with a documented 50-render free allowance.
- Choose GetScreenshot.dev when the advertised 500 monthly screenshots and multiple image formats fit your workload.
- Choose ScreenshotNeo first when clean pages, predictable billing, AI-agent access, and a low-cost hosted API matter.
FAQ
Can an ASP.NET app convert private HTML?
Yes, with an embedded library such as SelectPdf or GrabzIt’s HTML methods. A hosted renderer needs the HTML in the request or a URL it can reach; private localhost URLs are not automatically accessible.
Do these services create PDFs as well as screenshots?
GrabzIt, SelectPdf, HTML2IMG, GetScreenshot.dev, and ScreenshotNeo document PDF output. Confirm paper size, margins, page ranges, and print CSS before relying on exact pagination.
Is a free quota suitable for production?
It can be suitable for prototypes and low-volume jobs. Add quota monitoring, caching, retry limits, and an upgrade plan before a production workload depends on a free allowance.
How do I prevent users from abusing my screenshot endpoint?
Require authentication, validate and allowlist destinations, rate-limit requests, cap output size, and reject private IP ranges to reduce SSRF and resource-abuse risk.
