JavaScript

Share JavaScript code online.

Paste JavaScript functions, browser scripts, or Node.js utilities: highlighted, encrypted, and shareable in seconds.

textdrop.sh/xk4mR2
1const debounce = (fn, delay) => {2  let timer;3  return (...args) => {4    clearTimeout(timer);5    timer = setTimeout(() => fn(...args), delay);6  };7};89const search = debounce(async (query) => {10  if (!query.trim()) return clearResults();1112  const res = await fetch(`/api/search?q=${encodeURIComponent(query)}`);13  const { results } = await res.json();14  renderResults(results);15}, 300);1617document18  .querySelector("#search-input")19  .addEventListener("input", (e) => search(e.target.value));
Every paste includes

JavaScript syntax highlighting

Paste JavaScript code and get a shareable link with full syntax highlighting, server-side rendered with no JavaScript overhead.

Burn after read

Deleted on first open. Can't be viewed twice.

Password protection

Add a password for end-to-end encryption with no raw key stored.

Configurable expiry

Set pastes to expire after 1 hour, 1 day, 7 days, or up to 30 days. Gone when you say so.

No account needed

No sign-up, no email, no ads. Paste and share in seconds.

How it works
Plain Text
Markdown
Code
DB_HOST=db-01.prod.internal
DB_USER=api_svc
DB_PASS=xK9$mP2!qR7nLw2
REDIS_URL=redis://:abc@cache:6379
delete after setup — expires 1hr
7 days
Share
textdrop.sh/
7 days · plain text
Use cases
  • 01Share browser utility functions
  • 02Send Node.js scripts for review
  • 03Share quick prototype snippets
  • 04Distribute build script helpers
  • 05Send frontend debugging snippets
FAQ
Does textdrop.sh highlight modern JavaScript (ES2024+)?+

Yes. The Shiki JavaScript grammar supports all modern syntax including optional chaining, nullish coalescing, top-level await, and the latest stage-4 proposals.

Can I share both .js and .mjs files?+

Yes. Select JavaScript as the language regardless of the file extension: the grammar handles both CommonJS and ESModule syntax.

What if I need my paste to self-destruct after being read?+

Enable burn-after-read when creating the paste. It is permanently deleted the first time anyone opens the link.

Other languages
Drop your code