Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a small table already displayed in a web page, the quickest repeatable client-side method is to render the table with html2canvas, then export the resulting canvas with toDataURL('image/jpeg', quality). Give the table a stable ID, set a solid background for JPEG, and capture its full scroll dimensions if it extends beyond the visible area. The result is a DOM-based rendering, not a pixel-perfect native browser screenshot, so check the JPG when the table uses complex CSS, external images, or embedded content.

Convert a table in the browser with html2canvas

This method runs in the page containing the table. It is suitable for a button that lets a visitor download an image, or for a small static table you want to export without sending its contents to a service. The example below captures the table element, includes content beyond its visible scroll area, uses a white background, and downloads a JPEG at quality 0.92.

1. Give the table a stable selector

Add an ID to the table you want to export. A stable selector makes it unambiguous which element the script should render. Include a table header for accessible column labels.

2. Add the library and export handler

Save this as an HTML file and open it in a modern browser. For a deployed page, use your normal dependency management or serve the library from your own site if that better fits your security and availability requirements.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Tengchi RCA to HDMI Converter, AV to HDMI Adapter
  • RCA Female to HDMI Video Converters Adapter : The cable is used to convert analog composite input to HDMI 1080p output, displayed on a 1080p HD TV/TV/monitor.
  • Input ports: 1xRCA Female (Yellow, White, Red), Output ports: 1xHDMI 1.3 1080p. NOT support 3D and 4K, NOT support HDMI Converts to AV
  • AV to HDMI Converter: Plug and Play, Easy to Install and Operate, Powered by External USB Cable. Note: Please hook up the USB power cable (included) to 5V 1Apower source during use (not included power supply ).
  • Support PAL, NTSC3.58, NTSC4.43, SECAM, PAL/M, PAL/N standard TV formats input. For PS2,PS3,Xbox,N64,STB, VHS, VCR, DVD Players and other devices with standard composite AV input.
  • You Will Get : 1x RCA Female TO HDMI Converter, 1xHDMI cable, 1xUSB cable, 1xUser Manual. ONE YEAR WARRANTY - if you are not satisfied for any reason whatsoever, do not hesitate to contact us .
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Export a table to JPG</title>
  <style>
    body { font: 16px/1.5 sans-serif; padding: 1rem; }
    table { border-collapse: collapse; width: 100%; }
    th, td { border: 1px solid #bbb; padding: .5rem; text-align: left; }
    th { background: #eee; }
  </style>
</head>
<body>
  <table id="table-to-capture">
    <thead>
      <tr><th>Plan</th><th>Price</th></tr>
    </thead>
    <tbody>
      <tr><td>Basic</td><td>$10</td></tr>
    </tbody>
  </table>
  <p><button id="save-jpg" type="button">Save JPG</button></p>

  <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas-next/1.8.0/html2canvas.min.js"></script>
  <script>
    document.getElementById('save-jpg').addEventListener('click', async () => {
      const table = document.getElementById('table-to-capture');
      try {
        const canvas = await html2canvas(table, {
          backgroundColor: '#ffffff',
          scale: window.devicePixelRatio,
          windowWidth: table.scrollWidth,
          windowHeight: table.scrollHeight,
          useCORS: true
        });
        const link = document.createElement('a');
        link.download = 'table.jpg';
        link.href = canvas.toDataURL('image/jpeg', 0.92);
        link.click();
      } catch (error) {
        console.error('Could not export the table:', error);
        alert('The table could not be exported. Check the browser console and try again.');
      }
    });
  </script>
</body>
</html>

Click Save JPG. The browser should download table.jpg. If the page is part of a larger application, put the script after the table markup or run it after the document has loaded. The code uses async because html2canvas returns a Promise.

Choose the capture size, background, and JPEG quality

Include a long table rather than just the visible viewport

The capture options set windowWidth and windowHeight from the table’s scrollWidth and scrollHeight. That can include content extending beyond the element’s visible area, such as a horizontally or vertically scrollable table. If your layout still clips the result, check whether a parent container applies overflow clipping or whether the table itself has a constrained size. For a very large table, export it in sections rather than relying on one enormous canvas.

Set pixel density deliberately

scale: window.devicePixelRatio increases the canvas pixel dimensions relative to its CSS dimensions on high-density displays. This can make text and borders look sharper, but it also increases memory use. If the browser runs out of memory or the output is too large, try a lower fixed scale such as 1, or capture separate table sections. There is no universal best scale: inspect the file at the size it will actually be viewed or printed.

Rank #2
DigitConvert RCA to HDMI Converter, AV to HDMI Adapter, 1080P Mini RCA Composite CVBS Audio Video Converter Supports PAL/NTSC Compatible with PC/Laptop/Xbox /PS4 /TV/STB/VHS/VCR/Blue-Ray
  • RCA to HDMI Converter: Converts analog RCA composite (Yellow, White, Red) input to HDMI 720P/1080P output on HDTVs/Monitors. Only support RCA to HDMI. NOT Support HDMI to RCA!
  • Plug to Play: AV to HDMI converter doesn't need extra drivers, just plug and play, easy to use. Please hook up the USB power cable (included) to 5V power adapter when using this RCA to HDMI adapter.
  • Wide Compatibility: This av hdmi converter supports for all standard TV formats such as PAL, NTSC3.58, NTSC4.43, SECAM, PAL/M, PAL/N. Provide advanced signal processing and make videos come to life.
  • Extensive Use: Composite to HDMI converter widely applied to PS2, PS3, Xbox, N64, WII, STB, VHS, VCR, DVD Players and other devices with standard composite AV input.
  • Attention & Package: Please ensure to connect this rca to hdmi converter to power source to make it work. Package include: 1x RCA to HDMI Converter, 1* Micro USB cable (adapter not included), 1*User Manual. Please free feel to contact us if you have any product problems.

Use a solid background for JPG

JPEG has no transparency channel. Setting backgroundColor: '#ffffff' gives transparent areas a white backing. Choose a different explicit color if that suits the table’s design; otherwise transparency may not produce the appearance you expect in the exported JPG.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Adjust JPEG quality or choose PNG

The second argument to toDataURL('image/jpeg', 0.92) is a quality value from 0 to 1. A higher value generally produces a larger file; the exact size depends on the table, its colors, and the browser’s encoder. Lower the value if file size matters and the image remains legible. If sharp text and hard-edged lines matter more than file size, PNG may be preferable: replace the export type with image/png and use a filename ending in .png.

Capture only the table or crop a region

Passing the table element to html2canvas focuses the export on that element rather than the surrounding page. If you need a specific rectangular crop, html2canvas also supports crop coordinates using x, y, width, and height. Coordinates and dimensions need to match the rendered content you intend to include; for a whole table, selecting the element and setting its scroll dimensions is usually simpler.

Rank #3
RCA to HDMI Converter, Wenter 1080P AV to HDMI Converter, Mini Composite CVBS Audio Video Adapter for VCR/VHS/Xbox/PS3/N64/Wii/Blue-Ray DVD Players (with RCA Male Cable & HDMI Cable)
  • Connect Classic RCA Devices to HDMI Displays: Bring older AV equipment back into use by converting yellow, white and red composite RCA signals into HDMI output for newer TVs, monitors and projectors. Choose between 720P and 1080P output at 60Hz to match your display. Please note that this av to hdmi adapter is built specifically for connecting an RCA/AV source to an HDMI display; it cannot convert an HDMI source to RCA/AV.
  • Complete 3-Cable Set Included: Includes separate RCA, HDMI and Micro USB cables for video/audio connection, HDMI output and power. The RCA and HDMI cables are detachable for flexible placement and use with compatible equipment. USB power is required for operation. A Micro USB cable is included; a 5V/1A power adapter is not included.
  • Selectable 720P and 1080P Output: Use the built-in resolution switch to select 720P or 1080P output at 60Hz based on your TV or monitor. No software or drivers are required. Connect the RCA source, HDMI display and USB power, then select the desired output resolution.
  • Compatibility with Legacy AV Devices: Compatible with RCA-output VCRs, VHS players, DVD players, set-top boxes and karaoke systems, as well as compatible PS1, PS2, PS3, Xbox, Wii, N64, SNES and GameCube systems using RCA/AV output. Supports PAL, NTSC3.58, NTSC4.43, SECAM, PAL/M and PAL/N analog input formats.
  • HDMI Output Based on the Original Source:Converts an analog RCA signal to HDMI output with selectable resolution up to 1080P. The av to hdmi converter changes the signal format but does not turn lower-resolution VHS footage or classic game graphics into native HD content. Final picture quality depends on the original source, connected equipment and display. For stable operation, connect the included USB power cable to a 5V/1A USB power source.

Understand fidelity and cross-origin limits

html2canvas reconstructs an image from the DOM and styles available to the page; it does not take a native screenshot of the browser’s final pixels. As a result, unsupported CSS or complex styling can render differently from what you see on screen. Test the exported result if the table depends on advanced effects, unusual fonts, or intricate layout rules.

External images and canvas security

An image loaded from another origin can taint the canvas, preventing it from being read for download. useCORS: true asks the renderer to load cross-origin images in a CORS-aware way, but the image server must also send suitable Access-Control-Allow-Origin headers. If it does not, use images served from the same origin or a same-origin proxy that you control and are authorized to use. The option cannot bypass browser security rules.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Iframes and embedded content

Same-origin iframes can be accessed, but browser security prevents a page from reading the contentDocument of a cross-origin iframe. If the table is inside a cross-origin embed, capture it from the page that owns the content or use a workflow with permission to render that page.

Rank #4
GINGIN RCA to HDMI Converter, AV to HDMI Converter for TV/PC/N64/Wii/PS1/PS2/PS3/STB/Xbox/VHS/VCR/Blue-Ray DVD Players, with 3.3ft RCA and HDMI Cables
  • RCA to HDMI Converter: Converts analog RCA composite (Yellow, White, Red) input to HDMI 720P/1080P (60HZ) output, displayed on smart TV, projector and HDTV monitor. Making video come alive, giving the most realistic HD visual experience. Important Note: RCA inputs for HDMI output only!
  • Easy to Use: GINGIN Mini RCA to HDMI Adapter need no extra driver, portable, flexible, just plug and play. Please hook up the USB power cable (included) to 5V 1A power adapter during use.
  • Widely Used: This AV to HDMI Adapter is widely applied to PS1, PS2, PS3, Xbox, N64, WII, STB, VHS, VCR, DVD Players and other devices with standard composite AV input.
  • Broad Compatibility: This Audio Video to HDMI Converter supports source formats of PAL, NTSC3.58, NTSC4.43, SECAM, PAL/M, PAL/N standard TV. Provide advanced signal processing with great precision, colors, resolutions, and details.
  • Package&After-sales Service: Package Include: 1*CVBS to HDMI Converter, 1*USB Power Cable(2.6ft/0.8m), 1*HDMI Cable(3.3ft/1m), 1*Male RCA Cables(3.3ft/1m), 1*User Manual. We provide 18 months after-sales service and 30 days no hesitate money back.

Canvas dimension and memory ceilings

Browsers impose limits on canvas dimensions and total pixel area, and practical limits vary by browser, operating system, and device. The html2canvas FAQ gives rough guidance of around 32,767 pixels per dimension for desktop Chrome, Firefox, and Safari, with lower practical limits on iOS; treat these as approximate implementation guidance, not guaranteed limits for every release or device. Even below a dimension ceiling, a large high-density canvas may exhaust available memory. Divide oversized tables into smaller captures and avoid needlessly high scale values.

Troubleshoot a blank, clipped, or failed JPG

  • The downloaded image is blank: Confirm the selector matches the intended table and that the table has rendered before the click handler runs. Check the browser console for a missing library, JavaScript error, or failed capture. If the table is populated asynchronously, wait until its rows are present before calling html2canvas.
  • Rows or columns are cut off: Capture the table’s full scrollWidth and scrollHeight, as in the example, and check overflow or fixed-size constraints on parent elements. If the table is exceptionally large, split it into sections.
  • An image is missing or export fails after adding an image: Check whether it comes from another origin and whether that server permits CORS access. Try a same-origin asset or an authorized same-origin proxy. useCORS: true alone cannot grant access that the server has not allowed.
  • The result looks different from the page: The library recreates the DOM rendering rather than capturing native browser pixels. Simplify unsupported or complex styling, or use a real browser screenshot workflow when exact browser rendering matters.
  • The browser becomes slow, crashes, or produces no file: Reduce the scale, shorten the capture by exporting sections, and retry on a device with more available memory. Large canvas limits are browser- and platform-dependent.
  • The background is unexpectedly dark or transparent-looking: Set an explicit backgroundColor and confirm it matches the appearance you want, since JPG cannot preserve transparency.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose a workflow for one-off, server-side, or repeated exports

One-off manual capture

For a single table, a browser’s screenshot facility or developer tools can be the simplest route. It avoids adding an export button, but it is a manual step rather than a repeatable download pipeline.

Server-side automation

For scheduled jobs or a server application, use a real browser controlled by Puppeteer or Playwright. html2canvas depends on browser globals such as window and document, so it is a client-side library rather than a standalone Node.js renderer. A headless browser can load a page and capture its rendered content, but it requires browser setup and operational care, including waiting for the table and its assets to finish loading.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
ABLEWE RCA to HDMI,AV to HDMI Converter, 1080P Mini RCA Composite CVBS Video Audio Converter Adapter Supporting PAL/NTSC for TV/PC/ PS3/ STB/Xbox VHS/VCR/Blue-Ray DVD Players
  • RCA to HDMI Converter: Converts analog RCA composite (Yellow, White, Red) input to HDMI 720P/1080P (60HZ) output,displayed on HDTV/Monitor,which can bring back your childhood memories.
  • Plug to Play: ABLEWE Mini RCA to HDMI converter no extra drivers need, just plug and play,easy to use.Please hook up the USB power cable (included) to 5V power source during use.
  • Wide Compatibility: Support source formats of PAL, NTSC3.58, NTSC4.43, SECAM, PAL/M, PAL/N standard TV. Provide advanced signal processing with great precision, colors, resolutions, and details.
  • Widely Used:Widely applied to PS2,PS3,Xbox,N64, WII, STB, VHS, VCR, DVD Players and other devices with standard composite AV input.
  • Attention & Package:Please ensure to connect this rca to hdmi converter to power source to make it work.Package include:1*RCA to HDMI Converter,1*usb power cable(adapter not included),1*User Manual.

Hosted screenshot API

A hosted API can be useful when your workflow needs HTTP requests for repeatable or batch captures. Check how it handles page access, sensitive table data, output formats, failures, and pricing before using one. A service that captures a URL needs the table to be available at the target page; do not send private data to a hosted service unless its data handling is suitable for your use.

Or skip the browser setup

If your table is on a page you can access by URL, ScreenshotNeo can return a screenshot in an image format, including JPG, with one GET request. Its API captures a page URL; this example is for a table already rendered on a reachable page, not raw HTML pasted into the request. For private tables, consider whether sending the page URL to a hosted API is appropriate.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/table -d format=jpg -o table.jpg

See the ScreenshotNeo documentation for request parameters and account setup. Cookie banners, popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots, and the free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo’s free plan.

Frequently Asked Questions

Can I convert an HTML table string without publishing a page?

The html2canvas example needs the table rendered in a browser DOM. A local HTML file can do that for a manual export; an API that captures a URL instead needs a page reachable at that URL.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Does html2canvas work in Node.js by itself?

No. It relies on browser APIs such as window and document; use a browser-controlled approach such as Puppeteer or Playwright for server-side rendering.

Can a JPG keep a transparent table background?

No. JPEG does not support alpha transparency, so choose a background color before exporting.

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.