prebaked.
Guide

Can ChatGPT read JavaScript?

Last reviewed

No, not when it crawls your site. ChatGPT's crawlers download the HTML your server sends, but they do not run the JavaScript in it, so content that a script adds in the browser is not part of what they read. A study by Vercel and MERJ found that none of the major AI crawlers render JavaScript; Googlebot does.

This guide shows what each crawler is documented to do, where the vendors are silent, and how to check your own pages.

AI crawlers and JavaScript: bot by bot

"Runs JavaScript" below means: does the crawler execute the page's scripts before it reads the content? The table separates what the vendor documents from what published research measured.

Crawler Operator Used for Vendor documentation on JavaScript Published research Runs JavaScript
GPTBot OpenAI Training data for OpenAI's models Not documented Vercel and MERJ (Dec 2024): does not render JavaScript No (research)
OAI-SearchBot OpenAI Results in ChatGPT search Not documented Vercel and MERJ (Dec 2024): does not render JavaScript No (research)
ChatGPT-User OpenAI Pages fetched when a ChatGPT user's request needs them Not documented Vercel and MERJ (Dec 2024): does not render JavaScript No (research)
ClaudeBot Anthropic Training data for Anthropic's models Not documented Vercel and MERJ (Dec 2024): does not render JavaScript No (research)
PerplexityBot Perplexity Results in Perplexity search Not documented Vercel and MERJ (Dec 2024): does not render JavaScript No (research)
Googlebot Google Google Search Documented: renders pages with an evergreen version of Chromium Vercel and MERJ (Dec 2024): renders JavaScript Yes (documented)

What the vendors say:

  • OpenAI documents the purpose of GPTBot, OAI-SearchBot and ChatGPT-User and how robots.txt applies to each. The page does not say whether they run JavaScript.
  • Anthropic documents ClaudeBot, Claude-User and Claude-SearchBot and their robots.txt rules. JavaScript rendering is not mentioned.
  • Perplexity documents PerplexityBot and Perplexity-User. JavaScript rendering is not mentioned.
  • Google documents that Googlebot crawls a page, queues it for rendering, runs its JavaScript in headless Chromium and indexes the rendered HTML. The same page notes that not all bots can run JavaScript.

So for the AI crawlers, the "No" comes from measurement, not from a vendor statement. The research is from December 2024, and a vendor can change its crawler at any time. If a vendor documents JavaScript rendering later, this table will change.

What the research measured

Vercel and MERJ analysed AI crawler traffic across Vercel's network and published the results on 17 December 2024. The findings that matter here:

  • None of the major AI crawlers they looked at rendered JavaScript. The study names OpenAI (OAI-SearchBot, ChatGPT-User, GPTBot), Anthropic (ClaudeBot), Meta (Meta-ExternalAgent), ByteDance (Bytespider) and Perplexity (PerplexityBot).
  • ChatGPT's and Claude's crawlers do download JavaScript files. JavaScript files were 11.50 % of ChatGPT's fetches and 23.84 % of Claude's. They fetch the files but do not execute them.
  • Two exceptions: Google's Gemini uses Googlebot's infrastructure, which renders JavaScript, and AppleBot renders JavaScript through a browser-based crawler.

Fetching is not rendering

A crawler that fetches your page gets the HTML response from your server. Rendering is the next step: a browser engine runs the scripts, which build the page in memory. Only a crawler that renders sees what the scripts produce.

For a client-rendered app (a React, Vue or Vite single page app, or a site built with Lovable, Bolt or v0), the HTML response is often a shell: a title, a script tag and an empty <div id="root">. The text, headings and links are added later by JavaScript. A crawler that does not render reads only the shell.

Pages that send their content in the HTML (static sites, server-side rendering, prerendering) look the same to both kinds of crawler.

What this means for your site

  • Google can still index a client-rendered page, because Googlebot renders it. Google's own guide still recommends server-side rendering or prerendering, because not all bots can run JavaScript.
  • ChatGPT, Claude and Perplexity read only your HTML. If your content exists only after JavaScript runs, these crawlers have little or nothing to use when they answer a question about your product.
  • Blocking is a separate question. robots.txt decides whether a crawler may fetch a page. Rendering decides what it sees after fetching. A page can be allowed and still look empty.

Prebaked does not guarantee that an AI assistant mentions or cites your site. What it changes is that the crawler gets the same complete page your visitors see.

How to check your own pages

  1. Use the free checker. It fetches your page without JavaScript, the way AI crawlers do, renders it in a browser, and compares the word counts and headings.
  2. Compare by hand. Run curl https://www.<your-domain>/ and look at the response. If your main text is not in it, crawlers that do not render cannot see it.
  3. Look at your server logs. User agents such as GPTBot, OAI-SearchBot, ClaudeBot and PerplexityBot show which AI crawlers already visit you.

See what ChatGPT sees on your site

How to make JavaScript content readable for AI crawlers

There are three common ways to put the content into the HTML response:

Approach What it means Fits when
Server-side rendering The server builds the HTML for each request (for example with a framework that supports SSR) You can change the app's architecture
Static generation Pages are built to HTML at deploy time Content changes on deploys, not per request
Prerendering service Crawler requests are sent to a service that renders the page in a browser and returns the HTML You want to keep the app as it is

Prebaked is a prerendering service. A small snippet at your edge or server recognises crawler user agents and sends those requests to Prebaked, which returns the rendered page. People get your site as before, and crawlers get the same page with the content already in it. Nothing is added or changed for bots. If Prebaked is slow or unavailable, the crawler gets your original page, so it is never worse than today.

Install guides: Cloudflare Worker, Express, nginx, Netlify, Vercel. More on why AI crawlers matter: AI crawlers and JavaScript sites.

FAQ

Does ChatGPT render JavaScript?

Its crawlers do not, according to published research. Vercel and MERJ found in December 2024 that GPTBot, OAI-SearchBot and ChatGPT-User fetch pages and JavaScript files but do not execute the JavaScript. OpenAI's crawler documentation does not address rendering.

Can ChatGPT read my React or single page app?

It reads the HTML your server sends. If that HTML is an empty shell and the content is built by JavaScript, ChatGPT's crawlers see the shell. See the React guide and the single page application SEO guide.

Which AI crawlers run JavaScript?

In the Vercel and MERJ study, Google's Gemini (through Googlebot's infrastructure) and AppleBot rendered JavaScript. The other major AI crawlers in the study did not.

OpenAI lists three agents. OAI-SearchBot is used for ChatGPT search results, GPTBot for model training, and ChatGPT-User for pages fetched when a user's request needs them. OpenAI recommends allowing OAI-SearchBot if you want to appear in ChatGPT search answers.

Does Googlebot see my JavaScript content?

Yes. Google documents that Googlebot renders pages with an evergreen version of Chromium. Rendering can happen later than the crawl, and Google still recommends server-side rendering or prerendering. More in the JavaScript SEO guide.

Is serving prerendered HTML to crawlers cloaking?

Not when the content is the same. Google's dynamic rendering guidance says that as long as the rendered content is similar, Googlebot does not treat it as cloaking. Prebaked renders the page your visitors get and does not change it for bots.

How do I know what ChatGPT sees on my site?

Run the free checker. It shows the page without JavaScript next to the rendered page, with word counts and headings for both.

See what ChatGPT sees on your site