form-obfuscator via unpkg

Load the guarded registration helper. See the README for installation and API details.

Use fictional values only. Obfuscation is not encryption: values remain available to scripts and form submission. If JavaScript or the CDN fails, the field stays readable and editable without obfuscation.

Guarded registration

The helper registers the element when Custom Elements are supported. Focus the field to edit its value, then Tab away to obfuscate it.

import { defineFormObfuscator } from
  '@aarongustafson/form-obfuscator/define.js';
defineFormObfuscator();

<form-obfuscator>
  <label for="account-number">Account number</label>
  <input id="account-number" name="account"
    value="1234-5678-9012" />
</form-obfuscator>
Focus reveals the value; leaving the field obfuscates it.