Auto Text Converter

Enforce formatting. This script listens to keystrokes and instantly transforms text into a specific case format, ensuring consistent data entry.

Copy the Script

<!-- Uppercase -->
<input type="text" oninput="this.value = this.value.toUpperCase()">

<!-- Lowercase -->
<input type="text" oninput="this.value = this.value.toLowerCase()">

<!-- Capitalize Words (Advanced) -->
<script>
function capitalize(el) {
    el.value = el.value.replace(/\b\w/g, function(l){ return l.toUpperCase() });
}
</script>
<input type="text" oninput="capitalize(this)">

Frequently Asked Questions

Yes. `text-transform: uppercase` changes the *visual* appearance, but the actual value sent to the server remains mixed case. This JavaScript changes the actual data value.

Yes. Using the `oninput` or `onkeyup` event ensures that pasted text is also converted immediately.

Yes. You can add logic to capitalize only the first letter of each word (Title Case) using regex replacement.