pastesite.com New paste

Share logs without leaking credentials

Guide · updated October 2026 · 3 min read

Logs are the most useful thing to share when something breaks, and the most dangerous thing to paste by accident. A stack trace is harmless; the twenty lines around it often contain an authorization header, a session cookie, a customer email and an internal hostname. The fix is a two-minute routine, not a policy document.

Redact before you paste

Read the block once, top to bottom, looking only for these:

PatternWhat it looks likeReplace with
Bearer tokens, API keysAuthorization: Bearer sk_live_…, ps_…Bearer [REDACTED]
Passwords, secretspassword=, client_secret, -----BEGIN … PRIVATE KEY-----[REDACTED]
Session cookiesCookie: session=…, Set-Cookie[REDACTED]
Email addressesanything matching name@example.comuser@example.com
IP addresses203.0.113.42203.0.113.0 (documentation range)
Customer identifiersuser ids, order ids, phone numbersuser_1234 style placeholders
Internal hostnamesdb-prod-3.internaldb.internal

If a real credential did go into a paste, rotate it. Deleting the paste is not enough: the link may already be in a chat, a ticket or a browser cache.

Trim the log first

Nobody needs 40,000 lines. The error plus a few hundred lines of context is usually enough, and a smaller paste gets read faster.

Trim and redact in a shell

# last 300 lines of a log
tail -n 300 app.log > /tmp/clip.log

# from the first error onward
awk '/ERROR/{found=1} found' app.log | head -n 400 > /tmp/clip.log

# strip common secrets before pasting
sed -E 's/(Bearer|token|password|secret)=?[^ ,"]+/\1=[REDACTED]/gi' /tmp/clip.log > /tmp/safe.log

Keep the timestamps. They are what makes a log useful — they let the reader line the failure up with a deploy, a request or another service.

Choose link settings that match the content

A paste is not encrypted at rest beyond the provider's disk encryption, and the link is the only access control besides the password. Treat it like a shared document with a long URL, not like a secret store.

What not to share at all

Some logs should never leave the environment, even redacted: authentication logs with session material, payment processor payloads, anything covered by a compliance regime you are subject to, and logs containing health or financial data about identifiable people. In those cases, reproduce the failure with synthetic data and share that instead — it usually produces a clearer paste anyway.

Frequently asked questions

How big can a log paste be?

100,000 characters, roughly 1,500–2,000 log lines depending on line length. Trim with tail or awk before pasting if you are over that.

Can I delete a log paste after sharing it?

If you created it while signed in, yes, from your dashboard. Anonymous pastes cannot be deleted by their creator — use an expiry, or burn-after-read, so the content goes away on its own.

Is it safe to paste a stack trace publicly?

Usually, if it contains no credentials, customer data or internal hostnames. File paths and library versions are low risk. When in doubt, mark the paste unlisted and set an expiry.

Does the site index paste pages?

Paste pages are excluded from search engines via robots.txt, and unlisted pastes never appear in Recent or Trending. A link still works for anyone who has it.