HTML Image Input Generator
Configure <input type="image"> visually and copy the HTML.
HTML
<input type="image" name="submit-btn" src="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22120%22%20height%3D%2280%22%3E%3Crect%20width%3D%22120%22%20height%3D%2280%22%20fill%3D%22%2523d10505%22%2F%3E%3Ctext%20x%3D%2260%22%20y%3D%2244%22%20font-size%3D%2214%22%20fill%3D%22white%22%20text-anchor%3D%22middle%22%3ESubmit%3C%2Ftext%3E%3C%2Fsvg%3E" alt="Submit" width="120" height="80">
Free Online HTML Image Input Generator
renders a form submit button rendered as a clickable image instead of the default grey button. This generator gives you every relevant attribute as a form control: change a value on the left and the live preview on the right updates immediately, using the exact HTML you are about to copy.
Attributes you can set
- name — the key this field is submitted under when the form is posted.
- id — a unique identifier, useful for linking a
<label for="...">to this field. - src — the image shown as the clickable button.
- alt — alternate text for the image, read by screen readers.
- width — the rendered width of the image, in pixels.
- height — the rendered height of the image, in pixels.
When to use
Reach for for a branded "buy now" or "submit" button where the whole image acts as the submit control, including the click coordinates in the submitted data. Browsers apply built-in validation and, on touch devices, an appropriate on-screen keyboard based on the type you choose — using the right type is free UX and validation that plain type="text" does not give you.
Using the generated code
The snippet this tool produces is a bare element. Drop it inside a <form> with a method and action (or a JavaScript submit handler) to actually collect the value, and pair it with a <label> referencing its id so screen reader and keyboard users know what the field is for.
Browser support
and the attributes above are standard HTML5, supported in every modern browser without any JavaScript. Older browsers that don't recognize a newer input type simply fall back to a plain text field, so the markup stays safe to use everywhere.
Frequently Asked Questions
Do I need JavaScript for <input type="image"> to work?
No. This is plain HTML; the browser provides any built-in picker, validation, or keyboard on its own.
How do I actually collect the value a user enters?
Wrap the field in a <form> with a method and action (server-side) or read its .value with JavaScript on submit (client-side).
Can I style this field with CSS?
Yes. Target it by id, name, or [type="image"] to change colors, borders, and sizing while keeping its native behavior.