Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
Use base64 when the report must carry the image, or store the screenshot at an HTTPS URL when the image is large or separately managed. JSON cannot render an image by itself: it can contain base64 text or a URL that your application decodes or fetches. HTML can display either a data: URL or a hosted image through an <img> element.
This guide shows both patterns, explains payload, access and security trade-offs, and provides runnable ways to capture the screenshots before embedding them.
Choose the representation first
| Representation | Portability | Payload size | Dependency | Best fit |
|---|---|---|---|---|
| Base64 in JSON | Image travels with the record | Larger JSON than the binary file | No separate image fetch | Small attachments and self-contained records |
data: URL in HTML |
Image travels with the HTML | Larger HTML document | No separate image fetch | Small, standalone HTML artifacts |
| HTTPS URL in JSON or HTML | Report stays small | Image is stored separately | Reader must reach the URL and have permission | Large screenshots and attachment-oriented systems |
| MHTML or report-specific embedding | Resources can be packaged in one file | Package includes image bytes | Viewer must support that format | SSRS/Report Builder workflows |
There is no universal “fastest” choice. Measure the complete pipeline if generation time or throughput matters. A URL can reduce transfer size while adding a network request; inline data removes that request but enlarges the document.
Embed a screenshot in JSON as base64
Read the binary file, encode it as base64, and preserve the media type beside the encoded value. Property names are your application’s contract; the important details are the MIME type and unmodified encoded bytes.
#1 Best Overall
- PORTABLE SCANNER FOR USE ON-THE-GO — The fastest and lightest mobile single-sheet-fed compact document scanner in its class¹
- QUICK DOCUMENT SCANNING ― This Epson ultra-fast scanner scans a single page as quickly as 5.5 seconds²; Windows and Mac compatible
- VERSATILE PAPER HANDLING ― Portable scanner scans documents up to 8.5 x 72 in; Also easily digitizes receipts and ID cards to make accounting, bookkeeping, and organizing simpler
- INTUITIVE, HIGH-SPEED SOFTWARE — Epson ScanSmart Software³ is a smart tool allowing you to easily scan, review, and save; Stay organized easily with the help of this Epson scanner
- EASY SETUP — USB-powered connect to your computer for quick and simple scanning; No batteries or external power supply required to operate portable document scanner; Standard Connectivity: USB 2.0
import base64, json
from pathlib import Path
image = Path("checkout-error.png").read_bytes()
report = {
"screenshots": [{
"name": "checkout-error",
"mimeType": "image/png",
"data": base64.b64encode(image).decode("ascii")
}]
}
Path("report.json").write_text(json.dumps(report), encoding="utf-8")
A consumer reverses the operation by base64-decoding data and writing the resulting bytes using mimeType to choose a file extension or renderer. Base64 is text encoding, not an image format and not structured image data.
Validate before publishing
- Check that the MIME type matches the actual file (for example,
image/pngfor PNG bytes). - Do not insert line breaks, spaces or URL encoding into the base64 value unless your decoder explicitly supports them.
- Set request, database and message limits for the enlarged JSON envelope. A receiver can reject an oversized request before any browser renders it.
- Keep secrets out of the screenshot and report metadata; JSON encoding does not provide confidentiality.
Embed a screenshot in JSON by URL
Store the image in object storage or a report asset service and reference it with HTTPS:
{
"screenshots": [
{
"name": "checkout-error",
"mimeType": "image/png",
"url": "https://reports.example.test/screenshots/checkout-error.png"
}
]
}
Use a real host controlled by your workflow. Define retention, access policy and deletion behavior. A syntactically valid URL is not enough: the recipient must be able to resolve it, authenticate if required, and retrieve the object before it expires.
Public, signed and authenticated URLs
- Public URL: simplest for broadly distributed reports, but anyone with the link may see the screenshot.
- Signed or expiring URL: limits exposure and supports private reports; choose an expiry longer than the report’s expected reading window.
- Authenticated URL: appropriate for controlled applications, but some report viewers cannot send credentials when loading external images.
For large attachments, URL references avoid request bodies that exceed operator limits. Attachment specifications commonly use HTTP 413 for an attachment over a configured limit and recommend a URL fallback; treat those limits as system-specific, not as a universal JSON rule.
Rank #2
- FAST SPEEDS - Scans color and black and white documents a blazing speed up to 16ppm (1). Color scanning won’t slow you down as the color scan speed is the same as the black and white scan speed.
- ULTRA COMPACT – At less than 1 foot in length and only about 1. 5lbs in weight you can fit this device virtually anywhere (a bag, a purse, even a pocket).
- READY WHENEVER YOU ARE – The DS-640 mobile scanner is powered via an included micro USB 3. 0 cable allowing you to use it even where there is no outlet available. Plug it into you PC or laptop and you are ready to scan.
- WORKS YOUR WAY – Use the Brother free iPrint&Scan desktop app for scanning to multiple “Scan-to” destinations like PC, Network, cloud services, Email and OCR. (2) Supports Windows, Mac and Linux and TWAIN/WIA for PC/ICA for Mac/SANE drivers. (3)
- OPTIMIZE IMAGES AND TEXT – Automatic color detection/adjustment, image rotation (PC only), bleed through prevention/background removal, text enhancement, color drop to enhance scans. Software suite includes document management and OCR software. (4)
Display a base64 screenshot in HTML
An HTML data URL has metadata, a comma separator and the encoded bytes. The media type must be correct:
<img
src="data:image/png;base64,iVBORw0KGgo..."
alt="Checkout error shown after submitting the form">
Generate the value rather than hand-editing it:
import base64
from pathlib import Path
encoded = base64.b64encode(Path("checkout-error.png").read_bytes()).decode("ascii")
html = f'''<img src="data:image/png;base64,{encoded}"
alt="Checkout error shown after submitting the form">'''
Path("report.html").write_text(html, encoding="utf-8")
Use meaningful alternative text when the screenshot conveys evidence or status. If nearby text fully communicates the same information and the image is decorative, use alt="". Validate the generated HTML and confirm that the data URL has no accidental whitespace or truncated bytes.
Display a hosted screenshot in HTML
<img
src="https://reports.example.test/screenshots/checkout-error.png"
alt="Checkout error shown after submitting the form"
loading="lazy">
loading="lazy" can defer off-screen images, but it does not solve authorization or retention problems. Confirm that the HTML viewer can fetch external resources; some reporting products cannot display authenticated images.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Capture the image before embedding it
You can create the PNG, JPEG or WebP with a browser automation tool, save it, then apply either JSON pattern. A robust capture should wait for the page state you intend to document, set a deterministic viewport and redact sensitive content before publication.
Rank #3
- STAY ORGANIZED – Easily convert your paper documents into digital formats like searchable PDF files, JPEGs, and more.Power Consumption : 2.5W or less (Energy Saving Mode: 0.7W). Suggested Daily Volume : 500 scans..Does it contain liquid: no
- CONVENIENT AND PORTABLE –lightweight and small in size, you can take the scanner anywhere from home offices, classrooms, remote offices, and anywhere in between
- HANDLES VARIOUS MEDIA TYPES – Digitize receipts, business cards, plastic or embossed cards, reports, legal documents, and more
- FAST AND EFFICIENT – No technical hurdles or complicated setups here; easily scan both sides of a document at the same time, in color or black-and-white, at up to 12 pages-per-minute, and with a 20 sheet automatic feeder
- BROAD COMPATIBILITY – Works with both Windows and Mac devices, be it laptop or computer
Or skip the browser setup
ScreenshotNeo is a screenshot API and MCP server. Its clean-shot workflow accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; each step can be disabled. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and billing status. It supports PNG, JPEG, WebP and PDF.
One request is enough:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Then place shot.webp into the base64 or URL workflow above. See the ScreenshotNeo documentation for parameter details. Python and Node.js equivalents are also available:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
r.raise_for_status()
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}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
await Bun.write('shot.webp', res);
ScreenshotNeo includes full-page capture with lazy images loaded, CSS-selector element capture, dark mode, device presets and custom viewports, retina scale, PDF paper and page controls, HTML/CSS rendering, custom JavaScript and CSS, click and wait actions, request and resource blocking, headers, cookies, user agents, authorization, timezone and geolocation, transparent backgrounds, resizing, configurable caching, signed links, asynchronous jobs with signed webhooks, bulk capture for up to 100 URLs per call, usage reporting and an OpenAPI specification. Familiar parameter names from other screenshot APIs are accepted to ease migration. An MCP server exposes take_screenshot, get_page_info and capture_pdf to Claude, Cursor and other MCP clients.
Recommended Free Tools
The Free plan includes 1,000 shots per month with no card. Paid plans are Starter $5 for 3,000 shots, 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. Create a free ScreenshotNeo account.
Size, browser limits and delivery constraints
Inline data makes the report larger because binary bytes become text. The exact increase depends on the image and surrounding envelope; do not assume a fixed percentage without measuring your own files. RFC 2397 describes data URLs as useful for short values, while current MDN documentation reports implementation limits of 512 MB for Chromium and Firefox and 2,048 MB for Safari/WebKit. Those are browser data-URL limits, not guarantees for an API, JSON parser, database, proxy or report generator.
Rank #4
- IRIScan Express, portable scanner : scans color and black and white documents a blazing speed up to 8ppm simplex. Color scanning won’t slow you down as the color scan speed is the same as the black and white scan speed.
- IRIScan Express mobile scanner is powered via an included micro USB 2. 0 cable allowing you to use it even where there is no outlet available. Plug it into you PC or laptop and you are ready to scan. USB cable provided. AC Adapter not provided and not needed.
- IRIScan flatbed scanner uses a simplex scanning mode allows for quick and straightforward scanning of single-sided documents. IRIScan with its full portable features is the ideal document scanners for computers.
- IRIScan document scanner : Versatile scanning capabilities, including scanning to Word, PDF, and Excel formats with companion software provided Readiris OCR
- Receipt scanner and card scanner with Additional features include scanning business cards directly to Outlook, photo scanning, and receipt scanning for efficient document management
Check limits at every layer:
- Screenshot service response and timeout limits.
- HTTP request and response maximums.
- Queue, message-bus and database field limits.
- HTML renderer memory and document-size limits.
- Object-storage retention and download permissions.
When any layer is tight, store the image separately and put an HTTPS reference in the report. For a single-file requirement, product-specific MHTML or report-builder embedding may package binary resources, but behavior depends on the renderer and viewer.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Security and correctness checklist
- Use HTTPS for externally hosted images.
- Apply normal output encoding and HTML sanitization when report content is untrusted. Embedding an image does not make arbitrary HTML safe; report parameters can create script-injection risks in some HTML-rendering scenarios.
- Review screenshots for credentials, tokens, personal data and internal URLs before storing or sharing them.
- Choose access controls and retention deliberately. Expired or revoked URLs make an otherwise valid report incomplete.
- Keep the declared media type adjacent to the bytes or URL so consumers do not need to guess.
- Use deterministic filenames or IDs and avoid accepting a user-supplied path directly when writing decoded files.
Troubleshooting
The image icon is broken
Check the data: prefix, comma separator, media type and base64 integrity. Decode the value to a temporary file and compare its file signature with the declared MIME type.
JSON is rejected as too large
Move the image to HTTPS storage and send a URL, or raise the relevant gateway and application limits together. Raising only one limit leaves another layer able to reject the request.
The hosted image works in a browser but not in the report viewer
Test from the viewer’s network and identity. The URL may require credentials, be blocked by policy, have expired, or have restrictive content controls. Use a reader-accessible signed URL or inline data for a small, non-sensitive image.
Best Value
- Scanner type: Document
- Connectivity technology: USB
- With Auto Scan Mode, the scanner automatically detects what you're scanning
- Digitize documents and images
The screenshot is blank or shows a consent popup
Wait for the required selector or network state, ensure lazy content is loaded, and capture after the consent interaction. ScreenshotNeo can accept consent banners and remove supported popups before the shot; inspect its page-verdict and billing headers when diagnosing failures.
The HTML report exposes private data
Inline data is copied wherever the HTML is copied. Hosted images can also leak through public links or referrer behavior. Redact the source page, restrict storage, use HTTPS, and set a retention period.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteImages are cut off or unreadable
Use a full-page capture or capture the specific element, then select an appropriate viewport and device scale. For long documents, PDF page ranges and margins may be more legible than one very tall image.
Decision guide
- Need a self-contained record and the image is small? Use base64 in JSON.
- Need a standalone HTML file with a few small images? Use
data:image/...;base64,. - Have large images, many screenshots or strict payload limits? Use HTTPS URLs and manage retention and permissions.
- Need a product-specific single-file report? Evaluate MHTML or your report builder’s embedding support.
- Need repeatable captures without maintaining browser automation? Use ScreenshotNeo, then choose base64 or URL packaging based on the report’s delivery constraints.
Frequently Asked Questions
Can JSON contain raw PNG or JPEG bytes?
Standard JSON is text, so represent binary image content as base64 text or reference it with a URL. Keep the MIME type alongside the chosen representation.
Does base64 make an image smaller?
No. Encoding binary data as text enlarges the report; the exact change depends on the bytes and JSON or HTML envelope.
Will every HTML viewer load an external image URL?
No. Network policy, authentication, expiration and viewer capabilities can prevent retrieval. Test with the actual report reader.
Free tools Windows power users keep installed
One-click scans. No signup required.
Should I use PNG or JPEG for a report screenshot?
Choose based on the content and your capture pipeline: preserve clarity for text-heavy screens and consider a smaller format when photographic content dominates. Verify the resulting file and MIME type.
Quick 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.

