← All free tools

Free tool

API Key Leak Checker

Leaked key checker for built JavaScript

Use this if an AI built your front end and you want an API key leak checker to find keys in the JavaScript your site sends to every visitor.

Paste the JavaScript your site ships and find API keys left in it: AWS keys, private keys, Stripe, OpenAI, Slack and Google keys, Supabase service_role keys, and secret-named values. It uses the same key rules the installed audit runs over your source.

No account. No AI call. Nothing is uploaded: this runs in your own browser, so what you paste never reaches us to be kept.

You can link to this tool with the box already filled in, and it waits for you to press the button. Example: https://vibecoderplayground.ai/free-vibe-coding-tools/api-key-leak-checker.html?source=const%20config%3D%7BapiKey%3A%22FAKEFAKEFAKEFAKE1234%22%7D%3B

What it reads

This reads the JavaScript you pasted for text shaped like a key. Each match is something to look at, not a verdict: nothing here can tell a live key from a revoked or test one.

What it does not look at

What to do with the result

Start with the first key on the list. Revoke or roll it at the service that issued it before you touch the code, because the files you already shipped are cached and copied, and a new build does not take them back.

Then move the call that uses the key to your server or a serverless function, and keep the new key there. Only a key made to be public, such as a Stripe pk_ key or a Supabase anon key, belongs in the browser.

Run Next

The full audits these checks come from run in Vibe Coder Playground, on your own project: see the Playground download.

Questions about leaked API keys

Why would an API key be in my JavaScript?
Build tools copy any value your front-end code reads into the files they ship. In Vite that is every VITE_ variable, in Next.js every NEXT_PUBLIC_ variable, and in Create React App every REACT_APP_ variable. An AI that put a secret key in one of those, or typed it straight into the code, has sent it to every visitor.
Where do I find my built JavaScript?
Run your build and open the dist, build or .next/static folder. Or open your live site, open the browser's developer tools, go to Sources, and copy a script file. One paste holds up to 65,536 characters, so check a large bundle one file or one chunk at a time.
It found a key. What do I do first?
Revoke or roll the key at the service that issued it, before you change any code. Removing it from the next build does not help: the old files are already cached and copied. Then make a new key and move the call that uses it to your server or a serverless function.
Are some keys meant to be public?
Yes. A Stripe publishable key (pk_) and a Supabase anon key are made to ship in the page, and the checker does not flag them. Google AIza keys, which Firebase uses too, can be either, so the checker flags them: check that yours is restricted to your site and the APIs it needs.
Is my code uploaded?
No. The checker runs in your own browser, so what you paste never reaches us, and it makes no AI call. It also never shows a key whole: each result keeps the first and last four characters only.