# How to check any website for exposed API keys in its JavaScript (5 minutes, no tools)

> Source: <https://dev.to/proofforge_live/how-to-check-any-website-for-exposed-api-keys-in-its-javascript-5-minutes-no-tools-5ehn>
> Published: 2026-11-27 22:37:04+00:00

**Recommendation:** Scan your own site's JS bundles for sk-, sk_live_, AKIA and service_role JWT prefixes, and confirm /.env, /.git/HEAD and .map files return no real contents.
More in the playbook "Securing agents and AI tools": <https://wpnews.pro/playbooks/agent-security>

You can check what a website hands to every visitor in a few minutes. No account and no special tools. This is the same look a stranger gets, so it only makes sense on sites you own or have permission to test.

Open the site, press F12, go to the **Network** tab, reload, and filter by **JS**. Click the largest `.js` files (names like `index-abc123.js` or `main.js`).

Use the search box in the Sources tab (Ctrl+Shift+F) or paste the file into an editor. Look for these prefixes:

| Pattern | What it is | In the browser? | 
|---|---|---|
| `sk-` or`sk-proj-` | OpenAI secret key | Never | 
| `sk_live_` | Stripe secret key | Never | 
| `pk_live_` | Stripe publishable key | Fine | 
| `eyJ...` with`"role":"service_role"` | Supabase service role JWT | Never | 
| `eyJ...` with`"role":"anon"` | Supabase anon key | Fine if access rules are on | 
| `AKIA` | AWS access key ID | Never | 

A JWT is three base64 parts separated by dots. Paste the middle part into a base64 decoder, or use a local decoder, and read the `role` claim. Do not paste a real secret into a website you do not trust.

Request `/.env` and `/.git/HEAD` on the site. A real file shows contents. A normal HTML page means the host is returning its fallback, which is not a leak. Also check whether the bundle ends with a `//# sourceMappingURL=` line and whether that `.map` file loads. A public source map shows your original source code.

Removing it from the site does not undo exposure. Anything that was served can have been copied.

ProofForge has free read-only checkers that do these steps for a site you own: [https://proofforge.live/tools/exposed-api-key-checker](https://proofforge.live/tools/exposed-api-key-checker) and [https://proofforge.live/tools/env-file-checker](https://proofforge.live/tools/env-file-checker) . Key prefix reference and the fix for each: [https://proofforge.live/leaked-keys](https://proofforge.live/leaked-keys)

A clean result is evidence, not a guarantee. It does not see server code or logged-in behavior.
