A static, dependency-free calculator for checksum-neutral IPv6-to-IPv6 Network Prefix Translation (RFC 6296).
Enter the internal source address with its prefix length (e.g. fd01:203:405:1::1234/48, /1–/64) and the external prefix, and it returns the translated address with the adjusted 16-bit word, so TCP/UDP checksums stay valid without being recalculated.
/48or shorter: bits 48–63 (the subnet word) are adjusted (RFC 6296 §3.2)./49–/64: the first interface-identifier word that is not0xFFFFis adjusted (§3.5).
index.html Markup only
css/styles.css Styles (light + dark mode)
js/nptv6.js Pure NPTv6 / IPv6 logic (no DOM), unit tested
js/app.js UI wiring (form handling, rendering)
tests/ Node test suite (node:test)
.nojekyll Tells GitHub Pages to serve files as-is
ES modules don't load from file://, so serve the folder over HTTP:
npm start # python3 -m http.server 8000
# open http://localhost:8000npm test # requires Node 18+- Push this folder to the root of a GitHub repository.
- Go to Settings → Pages.
- Under Build and deployment, set Source to Deploy from a branch, pick
mainand/ (root), then save. - The site will be live at
https://<user>.github.io/<repo>/within a minute or two.
All asset paths are relative, so it works from a project subpath without changes.