embed.

Drop nap tools into any HTML page. Runs in your visitor's browser. No API key. No rate limit. No uploads.

How it works

One script tag registers a set of Web Components. Then you use them like normal HTML. Each component runs the tool's logic entirely on the visitor's device — same as our site — and encapsulates its styles in Shadow DOM so it never fights with your page CSS.

<script src="https://tools.napdesigns.com/embed.js" defer></script>

no api keyno rate limitno uploadsshadow DOMSRI verified

Available components

<nap-qr> — QR code

<nap-qr text="https://your.site/" size="256" fg="#000000" bg="#ffffff" level="M"></nap-qr>
AttributeDefaultDescription
textContent to encode (URL, WiFi, vCard, anything)
size256Pixel size (square)
fg#000000Foreground color (hex)
bg#ffffffBackground color (hex)
levelMError correction: L / M / Q / H
margin4Quiet-zone modules
hide-attribfalseHide the "powered by @nap.codes" line

<nap-hash> — Cryptographic hash

<nap-hash text="hello world" algo="SHA-256" encoding="hex"></nap-hash>
AttributeDefaultDescription
text""String to hash
algoSHA-256SHA-1 · SHA-256 · SHA-384 · SHA-512
encodinghexhex · base64

<nap-random> — CSPRNG string

<nap-random length="32" charset="alphanumeric" count="3" prefix="sk_" suffix=""></nap-random>
AttributeDefaultDescription
length32Characters per string, 1-1024
charsetalphanumericalphanumeric · alpha · digits · hex · base64 · base64url · custom
custom""When charset="custom", use these characters
count1Number of strings, 1-100
prefix""Literal prefix (e.g. "sk_live_")
suffix""Literal suffix

<nap-base> — Number base converter

<nap-base value="255" from="10"></nap-base>
AttributeDefaultDescription
value""Input number as string
from10Input base: 2 · 8 · 10 · 16 (or any 2-36)

<nap-lorem> — Placeholder text

<nap-lorem count="2" unit="paragraphs" start-lorem="true"></nap-lorem>
AttributeDefaultDescription
count3Number of paragraphs / sentences / words
unitparagraphsparagraphs · sentences · words
start-loremtrueStart first output with "Lorem ipsum…"

Live examples

WiFi QR for your office / cafe

Password / token generator on your signup page

SHA-256 hash of your build for integrity display

Events + JS access

Every component fires nap-ready when rendered:

const el = document.querySelector('nap-qr');
el.addEventListener('nap-ready', e => {
  console.log('QR modules:', e.detail.count);
  const dataUrl = el.toDataURL('image/png');
});

Random component exposes el.values (array). Hash exposes el.value (string).

Theming

Add theme="dark" to any component to switch text/background:

<nap-hash text="hello" algo="SHA-256" theme="dark"></nap-hash>

Attribution

By default a small "powered by @nap.codes" line appears under each component. Add hide-attrib to remove it — you are free to do so. If your project can spare the space we do appreciate the credit.

Framework usage

Web Components work natively in React, Vue, Svelte, Angular, and vanilla HTML. In React, use lowercase kebab-case attributes as strings:

<nap-qr text="https://your.site/" size="256" />

What we do not provide

Licensing

Free for any use, including commercial. See terms.

Source

github.com/pratham19980315/napdesigns-toolsembed.js at the repo root.