Skip to content
ShipCheck

Free tool

Is this API key safe to put in my frontend?

Type just the first few characters of a key, like sk_live_ or sb_publishable_. We'll tell you which service it's from and whether it's meant to be public. Don't paste the whole key: the box stops at 12 characters, and nothing you type leaves your browser.

Don't paste a whole key. The box keeps at most 12 characters (0/12 now), and nothing you type leaves your browser.

Check your whole live app for exposed keys, free.

ShipCheck downloads your page and its JavaScript the way a browser does and looks for known secret key formats. It only ever shows the first 6 characters of any key it finds.

Why the first few characters are enough

Most providers start their keys with a fixed prefix that says what kind of key it is. Stripe's publishable keys start with pk_ and are made for browser code, while its secret and restricted keys (sk_, rk_) must stay on a server. Supabase's new keys work the same way: sb_publishable_ is public, sb_secret_ bypasses Row Level Security. You never need the random part of the key to tell them apart, so don't share it.

Some prefixes can't settle it. Every JWT starts with eyJ, and that includes both Supabase's public legacy anon key and its secret service_role key. A Google AIza key can be fine in a browser, but only once it's restricted to your websites and to the APIs you use.

Prefixes this tool knows

Starts withServiceIn the browser?
sk_live_StripeSecret: server only
sk_test_StripeSecret: server only
sk_org_StripeSecret: server only
rk_live_StripeSecret: server only
rk_test_StripeSecret: server only
pk_live_StripePublic by design
pk_test_StripePublic by design
sb_secret_SupabaseSecret: server only
sb_publishable_SupabasePublic by design
eyJAny JWT (e.g. a Supabase anon or service_role key)Could be public or secret: check
AIzaGoogleBrowser OK only if restricted
sk-ant-AnthropicSecret: server only
sk-proj-OpenAISecret: server only
sk-OpenAI and other AI providersSecret: server only
ghp_GitHubSecret: server only
github_pat_GitHubSecret: server only
gho_GitHubSecret: server only
ghu_GitHubSecret: server only
ghs_GitHubSecret: server only
ghr_GitHubSecret: server only
AKIAAWSPairs with a secret: server only
ASIAAWSPairs with a secret: server only
xoxSlackSecret: server only
xapp-SlackSecret: server only

Anything else gets "we don't recognise that prefix". If you're not sure, treat a key as secret.

More detail: is it safe to put an API key in the frontend? and is the Supabase anon key safe?

Prefix matching is a quick guide, not proof. Some providers reuse prefixes.